{"openapi":"3.1.0","info":{"title":"Fax API","version":"0.1.0"},"paths":{"/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Password login. On a custom app hostname only that organization's users may log in.","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sign-in":{"post":{"tags":["auth"],"summary":"Sign In","description":"One sign-in for both realms (the web app's single `/login`). The API checks the email against platform\nadmins first, then tenant users, and opens a session in the realm whose password matches: a platform admin\nwhose password matches wins (`tenant_login_available` says whether a customer login matches too). On an\nactive custom hostname only that organization's tenant users can sign in; platform admins never do there.\nA failed sign-in is audit-logged (`auth.login_failed`) and answers 401 without saying which part was wrong.\n\nWhen the login has two-step verification the answer is `mfa_required: true` with an `mfa_token` (no session\nyet; `realm` already says which one): finish with `POST /v1/auth/mfa/verify`.","operationId":"sign_in","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/mfa/verify":{"post":{"tags":["auth"],"summary":"Verify Mfa","description":"Second step of sign-in, for both realms: the `mfa_token` from `POST /v1/auth/sign-in` (or `/auth/login`)\nand a current authenticator code or an unused recovery code. Opens the session the password step would have.\nAttempts are rate-limited per login (429). Audited: `auth.mfa_verified` (with `method`), `auth.mfa_failed`,\nand `auth.mfa_recovery_code_used` when a recovery code was spent.","operationId":"verify_mfa","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/token":{"post":{"tags":["auth"],"summary":"Refresh Token","description":"Exchange a live session for a fresh 15-minute user JWT (the BFF does this, not browser JS). 401 once the\nsession passed its idle or absolute limit (audited `auth.session_idle_logout` / `auth.session_expired`).","operationId":"refresh_access_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"End a tenant session. Audit-logged (`auth.logout`).","operationId":"logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTokenRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/accept-invite":{"post":{"tags":["auth"],"summary":"Accept Invite","description":"Set a password with an invite or password-reset token. The token is single-use. A platform admin's token\n(from `POST /admin/platform-users/{id}/password-reset`) works the same way.","operationId":"accept_invite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteResponse"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"Gone","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password-reset":{"post":{"tags":["auth"],"summary":"Request Password Reset","description":"Mail a one-time password-reset link (1 hour) to every active login with this email (on a custom app\nhostname, only that organization's). Always 202, whether or not the email exists. Complete the reset with\n`POST /v1/auth/accept-invite` and the token from the mail.","operationId":"request_password_reset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetAccepted"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me":{"get":{"tags":["auth"],"summary":"Get Me","description":"Who the presented credential is: kind, ids, email and name, level, scopes, and the effective brand of its\norganization (org brand with platform fallbacks).","operationId":"get_me","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/mfa":{"get":{"tags":["auth"],"summary":"V1 Get Status","description":"Two-step verification status of the signed-in user.","operationId":"get_mfa_status","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaStatus"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/mfa/enroll":{"post":{"tags":["auth"],"summary":"V1 Enroll","description":"Start enrollment: a new authenticator secret and its otpauth URI (QR). Confirm with\n`POST /v1/auth/mfa/enroll/confirm`. 409 when already enrolled.","operationId":"start_mfa_enrollment","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaEnrollment"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/mfa/enroll/confirm":{"post":{"tags":["auth"],"summary":"V1 Confirm","description":"Confirm enrollment with a current code. Returns ten single-use recovery codes, shown only now. Lifts an\nenrollment-only session and ends the user's other sessions. Audited `auth.mfa_enrolled`.","operationId":"confirm_mfa_enrollment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaCode"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaConfirmed"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/mfa/recovery-codes":{"post":{"tags":["auth"],"summary":"V1 Regenerate","description":"Replace the recovery codes (password and a current code required). The old codes stop working.","operationId":"regenerate_mfa_recovery_codes","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaReauth"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryCodes"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/mfa/disable":{"post":{"tags":["auth"],"summary":"V1 Disable","description":"Turn two-step verification off (password and a current or recovery code). 409 while the organization or\naccount requires it. Ends the user's other sessions. Audited `auth.mfa_disabled`.","operationId":"disable_mfa","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaReauth"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaStatus"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reauthenticate":{"post":{"tags":["auth"],"summary":"V1 Reauthenticate","description":"Confirm the password (and a code when enrolled) to reset the session's recent-auth clock, for routes that\nanswer 403 `reauthentication_required` (document downloads under a strict policy, API key creation).","operationId":"reauthenticate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaReauth"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReauthResult"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Change the signed-in tenant's password and revoke all other sessions.","operationId":"change_password","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChanged"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/sessions":{"get":{"tags":["auth"],"summary":"List Sessions","description":"Active sign-ins for the current user. Each row is the address and user agent recorded when that session was\nopened, and whether it is this request. Impersonation sessions are not listed.","operationId":"list_sessions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionList"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/auth/sessions/revoke-others":{"post":{"tags":["auth"],"summary":"Revoke Other Sessions","description":"Sign out every other device. This session stays signed in. Audited `auth.sessions_revoked`.","operationId":"revoke_other_sessions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionsRevoked"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/accounts/{account_id}/api-keys":{"post":{"tags":["api-keys"],"summary":"Create Account Key","description":"Account admins, org owners, and organization keys with keys:manage create account keys. A session must have\nsigned in or re-authenticated in the last 15 minutes (403 `reauthentication_required`).","operationId":"create_account_api_key","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List Account Keys","operationId":"list_account_api_keys","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ApiKeyOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Account Key","operationId":"revoke_account_api_key","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/api-keys":{"post":{"tags":["api-keys"],"summary":"Create Org Key","description":"Organization keys act like an org owner across /v1/org/* and every account in the org, by scope.","operationId":"create_org_api_key","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["api-keys"],"summary":"List Org Keys","operationId":"list_org_api_keys","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ApiKeyOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Org Key","operationId":"revoke_org_api_key","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org":{"get":{"tags":["organization"],"summary":"Get Org","description":"The caller's organization. Reseller staff also see the organization payer's processor, collection policy,\nbalance and credit limit; a direct customer sees null there (its payer is the account).","operationId":"get_org","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/org/billing/commitment":{"get":{"tags":["organization"],"summary":"Get Org Commitment","description":"Your organization's minimum monthly commitment for a period (default the current month): the amount for\nthe period, the charges counted toward it so far, and the shortfall period close would add. Read-only: only\nthe platform sets a commitment.","operationId":"get_org_commitment","parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},{"type":"null"}],"description":"YYYY-MM in the organization timezone; default the current month.","title":"Period"},"description":"YYYY-MM in the organization timezone; default the current month."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitmentOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/faxes/{fax_id}":{"get":{"tags":["organization"],"summary":"Get Org Fax","description":"Any fax of the caller's organization by id, with its `account_id`, so a link that carries only a fax id\ncan open the account's fax screen. A fax of another organization is not found (404); a direct owner sees only\nits own account's faxes.","operationId":"get_org_fax","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgFaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/accounts":{"get":{"tags":["organization"],"summary":"List Org Accounts","description":"Accounts of the caller's organization, newest first. Archived accounts are hidden unless\n`include_archived` is true. A direct owner sees only its own account.","operationId":"list_org_accounts","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived accounts. Omitted, they are hidden.","default":false,"title":"Include Archived"},"description":"Include archived accounts. Omitted, they are hidden."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AccountOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["organization"],"summary":"Create Org Account","description":"Resellers create customer accounts (default parent-billed). A direct organization cannot add one.","operationId":"create_org_account","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/accounts/{account_id}":{"get":{"tags":["organization"],"summary":"Get Org Account","description":"One account of the caller's organization (a direct owner sees only its own account).","operationId":"get_org_account","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["organization"],"summary":"Update Org Account","operationId":"update_org_account","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/accounts/{account_id}/archive":{"post":{"tags":["organization"],"summary":"Archive Org Account","description":"Archive an account of this organization. The body is `{\"reason\": \"...\"}`. 409 when a number is still\nassigned (`blockers` lists each one: release it to the organization pool or back to inventory first) or when\nthe account is already archived. Sending and receiving stop, the account's API keys and webhooks are revoked,\nand its users are signed out and cannot sign in. Users, faxes, and documents stay; retention and legal hold\nstill apply. A platform admin restores it. Audited `account.archive`.","operationId":"archive_org_account","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveReason"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/users":{"post":{"tags":["organization"],"summary":"Create Org User","description":"Invite organization staff (`org_owner` or `org_billing`, not bound to an account). Reseller organizations\nonly: a direct organization answers 409. Queues the invite mail; the user sets a password with\n`POST /v1/auth/accept-invite`. Counts against the organization's user ceiling; a duplicate email is 409.","operationId":"create_org_user","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["organization"],"summary":"List Org Users","description":"Organization staff (`org_owner`, `org_billing`: users not bound to an account), newest first. Account users\nare listed per account.","operationId":"list_org_users","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/users/{user_id}":{"patch":{"tags":["organization"],"summary":"Update Org User","description":"Rename, change role (`org_owner` / `org_billing`), or disable / re-enable organization staff. Reseller\norganizations only (409 on a direct organization). The last active `org_owner` cannot be demoted or disabled\n(409); an invited user becomes active only by accepting the invite.","operationId":"update_org_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUserPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/users/{user_id}/resend-invite":{"post":{"tags":["organization"],"summary":"Resend Org User Invite","description":"Mail a fresh invite to organization staff who have not accepted yet; earlier unused invite links stop\nworking. Reseller organizations only (409 on a direct organization); a user who is not `invited` answers 409.\n`invite_token` is returned only when APP_ENV is dev or test, as on create.","operationId":"resend_org_user_invite","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/users":{"post":{"tags":["accounts"],"summary":"Create Account User","description":"Invite an account user. Inserts an invite token and queues the invite email.","operationId":"create_account_user","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["accounts"],"summary":"List Account Users","operationId":"list_account_users","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_UserOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/users/{user_id}":{"patch":{"tags":["accounts"],"summary":"Update Account User","operationId":"update_account_user","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/settings":{"get":{"tags":["accounts"],"summary":"Get Account Settings","operationId":"get_account_settings","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSettings"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["accounts"],"summary":"Update Account Settings","description":"Cover template, retention, default from-DID, email-to-fax allowlist, notification defaults, notification\nmode. `retention_days` below the account's `retention_floor_days` answers 400. A change to `notification_mode`\nis also audit-logged as `account.notification_mode`.","operationId":"update_account_settings","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSettings"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/billing":{"get":{"tags":["accounts"],"summary":"Get Account Billing","description":"Mode, policy, balance, processor. Parent-billed accounts are paid by the organization; its balance and\npolicy are not shown here.","operationId":"get_account_billing","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountBilling"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/uploads":{"post":{"tags":["uploads"],"summary":"Create Upload","description":"Upload a document (PDF, TIFF, JPEG, PNG) as the raw request body. Returns a 1-hour `content_ref`.","operationId":"create_upload","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"image/tiff":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}}}}}},"/accounts/{account_id}/faxes":{"post":{"tags":["faxes"],"summary":"Send Fax","description":"Queue an outbound fax from a prior upload. Requires `Idempotency-Key`.\n\nCreates with the same account, sender, sandbox mode, destination, document SHA-256 (or uploaded document\nID), and client_reference within 10 seconds return the existing fax object with HTTP 200, even with a\ndifferent Idempotency-Key. Concurrent matching creates are serialized. Different documents or references,\nor a create more than 10 seconds later, are independent faxes (with a fresh, unused upload).\n\nReturns 202 with the tenant fax object for a new fax. Poll `get_fax` (or use a webhook) for status.\nA `bfx_test_` key creates a sandbox fax: rendered and admitted like a real one, then completed without dialing or billing.","operationId":"send_fax","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["faxes"],"summary":"List Faxes","description":"List the account's faxes, newest first (`created_at desc, id desc`), with cursor pagination.","operationId":"list_faxes","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"enum":["outbound","inbound"],"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One status or a comma-separated list of `FaxOut.status` values (e.g. `alternate_route` or `failed,expired`).","title":"Status"},"description":"One status or a comma-separated list of `FaxOut.status` values (e.g. `alternate_route` or `failed,expired`)."},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"E.164 sender.","title":"From"},"description":"E.164 sender."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"E.164 destination.","title":"To"},"description":"E.164 destination."},{"name":"did_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Did Id"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"client_reference","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client Reference"}},{"name":"unread","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: inbound faxes with read_at null.","title":"Unread"},"description":"true: inbound faxes with read_at null."},{"name":"updated_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only faxes changed after this instant.","title":"Updated After"},"description":"Only faxes changed after this instant."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FaxOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}/forward":{"post":{"tags":["faxes"],"summary":"Forward Fax","description":"Send this fax's stored document (received or sent) to another destination as a new outbound fax. Requires\n`Idempotency-Key`. A sent fax is forwarded without its original cover page; `cover` adds a new one.\n\nReturns 202 with the new fax, which goes through rendering, admission and billing like any `send_fax`. 409\nwhen the document was deleted. Audit-logged as `fax.forward` on the source fax. Like opening the document, a\nsession must have signed in recently (403 `reauthentication_required`); API keys are not affected.","operationId":"forward_fax","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxForward"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}":{"get":{"tags":["faxes"],"summary":"Get Fax","description":"One fax. `reject_reason` explains a `rejected` fax (problem type `admission_denied`).","operationId":"get_fax","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}/attempts":{"get":{"tags":["faxes"],"summary":"List Attempts","description":"Every delivery attempt for the fax, in sequence order. A fax has a handful, so one page holds them all.","operationId":"list_attempts","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AttemptOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}/events":{"get":{"tags":["faxes"],"summary":"List Fax Events","description":"The fax's status transitions, oldest first (the tenant-safe subset of the platform's event log: status\nchanges only, with failure class and reason). One page holds them all.","operationId":"list_fax_events","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_FaxEventOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}/document":{"get":{"tags":["faxes"],"summary":"Get Fax Document Url","description":"Fetch the document, PDF if rendered, else the TIFF. Every call is audit-logged as `fax.document_accessed`\n(channel web/api/mcp/mail-link, view or download).\n\nThe account's `document_access_mode` decides how: `redirect` (default) answers 302 to a 5-minute presigned URL\nsigned for the browser-reachable object-store host (`S3_PUBLIC_ENDPOINT`), inline unless `download=true`;\n`redirect=false` returns that URL as JSON. `logged_stream` never issues a presigned URL: this request receives\nthe bytes (200), and `redirect=false` returns a single-use link valid 60 seconds (`delivery: \"link\"`; a second\nfetch answers 410). Agents use `redirect=false` to receive a URL instead of bytes.\n\nA session must have signed in (or re-authenticated) recently: 403 `reauthentication_required` past the\neffective `recent_auth_minutes` (the stricter of the organization's and the account's; default 12 hours); API\nkeys are not affected.","operationId":"get_fax_document_url","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"redirect","in":"query","required":false,"schema":{"type":"boolean","description":"false: return the URL instead of 302.","default":true,"title":"Redirect"},"description":"false: return the URL instead of 302."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"true: Content-Disposition attachment (save) instead of inline (open).","default":false,"title":"Download"},"description":"true: Content-Disposition attachment (save) instead of inline (open)."},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"enum":["web","mail-link"],"type":"string"},{"type":"null"}],"description":"Web app only: `mail-link` when the signed-in user arrived from a notification mail link. Recorded on the audit row; ignored for API keys and MCP calls.","title":"Channel"},"description":"Web app only: `mail-link` when the signed-in user arrived from a notification mail link. Recorded on the audit row; ignored for API keys and MCP calls."}],"responses":{"302":{"description":"Redirect to a 5-minute presigned URL (PDF, else TIFF).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUrl"}}},"headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"200":{"description":"With redirect=false: the URL as JSON. On a `logged_stream` account without redirect=false: the document bytes themselves.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUrl"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["faxes"],"summary":"Delete Fax Document","description":"Delete the fax's stored document now (original, TIFF and PDF), before its retention period ends. The fax\nrecord stays, like after retention: numbers, times, pages, status and billing are kept and `content_deleted_at`\nis set. Only finished faxes. Refused with 403 while the account is on legal hold (`legal_hold`) or retention\nhold (`retention_hold`), or while the fax is younger than the account's `retention_floor_days`\n(`retention_floor`). Audit-logged as `fax.document_delete`.","operationId":"delete_fax_document","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"description":"`legal_hold`, `retention_hold` or `retention_floor`: deletion is suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}/cancel":{"post":{"tags":["faxes"],"summary":"Cancel Fax","description":"Cancel by state: `queued`, `rendering`, `admitted`, `retrying` become `cancelled` now. While a call is in\nflight (`originating`, `negotiating`, `transmitting`, or `alternate_route`) the fax gets\n`cancel_requested`; the call is hung up if it is still connected, and pages already delivered still bill.\nTerminal faxes return 409.","operationId":"cancel_fax","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/faxes/{fax_id}/read":{"post":{"tags":["faxes"],"summary":"Mark Fax Read","description":"Set `read_at` (first read wins). Inbox `unread=true` stops listing the fax.","operationId":"mark_fax_read","parameters":[{"name":"fax_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Fax Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaxOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/contacts":{"get":{"tags":["contacts"],"summary":"List Contacts","operationId":"list_contacts","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Match name, company, or number.","title":"Q"},"description":"Match name, company, or number."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_ContactOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contacts"],"summary":"Create Contact","operationId":"create_contact","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"Get Contact","operationId":"get_contact","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contacts"],"summary":"Update Contact","operationId":"update_contact","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["contacts"],"summary":"Delete Contact","operationId":"delete_contact","parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Contact Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/numbers":{"get":{"tags":["numbers"],"summary":"List Numbers","description":"DIDs assigned to this account, with labels and per-DID email recipients. No purchase here.","operationId":"list_numbers","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_NumberOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/numbers/{did_id}":{"patch":{"tags":["numbers"],"summary":"Update Number","operationId":"update_number","parameters":[{"name":"did_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Did Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/numbers/{did_id}/email-recipients":{"put":{"tags":["numbers"],"summary":"Set Number Email Recipients","description":"Replace who is mailed when this DID receives a fax. An empty list means every account admin.","operationId":"set_number_email_recipients","parameters":[{"name":"did_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Did Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipientsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/users/{user_id}/did-grants":{"get":{"tags":["numbers"],"summary":"Get User Did Grants","operationId":"get_user_did_grants","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidGrantsOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["numbers"],"summary":"Set User Did Grants","description":"Restrict an account user to these DIDs for sending, numbers, and the fax list. Empty list lifts it.","operationId":"set_user_did_grants","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidGrantsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DidGrantsOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/notification-preferences":{"get":{"tags":["numbers"],"summary":"Get Notification Preferences","description":"Which fax events email this user, and `sender_address`: the address those emails come from (allow-list\nit so they are never filtered).","operationId":"get_notification_preferences","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["numbers"],"summary":"Set Notification Preferences","description":"Which fax events email this user. Fields left out keep their current (or default) value. The response\ncarries `sender_address`, the address the emails come from.","operationId":"set_notification_preferences","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/dids":{"get":{"tags":["organization"],"summary":"List Org Dids","description":"DIDs assigned anywhere in the organization or sitting in its pool.","operationId":"list_org_dids","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"pool","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: only DIDs in the pool (no account)","title":"Pool"},"description":"true: only DIDs in the pool (no account)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OrgDidOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/dids/{did_id}/assign":{"post":{"tags":["organization"],"summary":"Assign Org Did","description":"Move a DID between this organization's accounts, or back to its pool. Never touches a DID outside the\norganization (404). Same interval rules and limits as the platform assign.","operationId":"assign_org_did","parameters":[{"name":"did_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Did Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgAssign"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDidOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/dids/{did_id}":{"patch":{"tags":["organization"],"summary":"Update Org Did","description":"Set a number's label, whether it is assigned to one of this organization's accounts or sits in its pool.\nThe account sees the same label on its Numbers page. Audit-logged as `did.label`.","operationId":"update_org_did","parameters":[{"name":"did_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Did Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDidPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgDidOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/billing/card-setup":{"post":{"tags":["billing"],"summary":"Create Org Card Setup","description":"Start saving a card for the organization (the payer for parent-billed accounts and the house account).\n\nCreates the organization's Stripe Customer on first use. The same `Idempotency-Key` returns the same\nSetupIntent (Stripe idempotency, 24 hours). A direct customer's payer is its account: use the account route.","operationId":"create_org_card_setup","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardSetupOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/billing/connect-onboarding":{"post":{"tags":["billing"],"summary":"Create Org Connect Onboarding","description":"Reseller organization owner: create (first call) or reuse the organization's Stripe Connect Express account\nand return a fresh onboarding link. Margin payouts start once Stripe reports `payouts_enabled` (the\n`account.updated` webhook, or `GET /v1/org/billing/connect-status?refresh=true`). The account is created with\na per-organization Stripe idempotency key, so concurrent calls agree on one account. Return and refresh URLs\nare under PUBLIC_APP_URL.","operationId":"create_org_connect_onboarding","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectOnboardingOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/billing/connect-status":{"get":{"tags":["billing"],"summary":"Get Org Connect Status","description":"The organization's Connect Express status: account id, `details_submitted`, `charges_enabled`,\n`payouts_enabled`. Normally kept current by the `account.updated` webhook; `refresh=true` (e.g. on the\nonboarding return page) asks Stripe directly.","operationId":"get_org_connect_status","parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"true: read the account from Stripe first and store its flags.","default":false,"title":"Refresh"},"description":"true: read the account from Stripe first and store its flags."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectStatusOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/billing/card-setup":{"post":{"tags":["billing"],"summary":"Create Account Card Setup","description":"Start saving a card for a delegated account (the account pays retail on its own processor).\n\nA parent-billed account has no card: its organization pays (409).","operationId":"create_account_card_setup","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardSetupOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/webhooks":{"get":{"tags":["webhooks"],"summary":"List account webhooks","description":"Webhook endpoints at this level, newest first. Secrets are never returned here.","operationId":"list_account_webhooks","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WebhookOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Create a account webhook","description":"Register a receiver URL. The response carries the signing secret once. Deliveries are signed with\n`{WEBHOOK_HEADER_PREFIX}-Timestamp` and `{WEBHOOK_HEADER_PREFIX}-Signature`\n(`hex(hmac_sha256(secret, \"{timestamp}.{raw_body}\"))`).","operationId":"create_account_webhook","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/webhooks/{webhook_id}":{"get":{"tags":["webhooks"],"summary":"Get a account webhook","description":"One endpoint (no secret).","operationId":"get_account_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["webhooks"],"summary":"Update a account webhook","description":"Change the URL or the event picks. The secret is unchanged (use rotate-secret).","operationId":"update_account_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete a account webhook","description":"Soft-delete the endpoint. Pending deliveries to it are dropped by the delivery worker.","operationId":"delete_account_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["webhooks"],"summary":"Rotate a account webhook secret","description":"Issue a new secret, returned once. For 1 hour deliveries carry signatures for both the new and the\nprevious secret (comma-separated, new first), so receivers can switch without dropping events.","operationId":"rotate_account_webhook_secret","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Send webhook.test to a account webhook","description":"Queue a signed `webhook.test` delivery carrying a synthetic fax object, so an integrator can verify\nsignatures before the first real fax. Returns the pending delivery.","operationId":"test_account_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List deliveries of a account webhook","description":"Delivery rows for this endpoint, newest first, with status, attempt count, and the response excerpt.","operationId":"list_account_webhook_deliveries","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DeliveryOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver":{"post":{"tags":["webhooks"],"summary":"Redeliver a account webhook delivery","description":"Send a past delivery again as a new delivery row (`redelivery_of` = the original). The body is the\noriginal envelope, so `delivery_id` inside it is unchanged and receivers can dedupe.","operationId":"redeliver_account_webhook_delivery","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/webhooks":{"get":{"tags":["webhooks"],"summary":"List organization webhooks","description":"Webhook endpoints at this level, newest first. Secrets are never returned here.","operationId":"list_org_webhooks","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_WebhookOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["webhooks"],"summary":"Create a organization webhook","description":"Register a receiver URL. The response carries the signing secret once. Deliveries are signed with\n`{WEBHOOK_HEADER_PREFIX}-Timestamp` and `{WEBHOOK_HEADER_PREFIX}-Signature`\n(`hex(hmac_sha256(secret, \"{timestamp}.{raw_body}\"))`).","operationId":"create_org_webhook","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/webhooks/{webhook_id}":{"get":{"tags":["webhooks"],"summary":"Get a organization webhook","description":"One endpoint (no secret).","operationId":"get_org_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["webhooks"],"summary":"Update a organization webhook","description":"Change the URL or the event picks. The secret is unchanged (use rotate-secret).","operationId":"update_org_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete a organization webhook","description":"Soft-delete the endpoint. Pending deliveries to it are dropped by the delivery worker.","operationId":"delete_org_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["webhooks"],"summary":"Rotate a organization webhook secret","description":"Issue a new secret, returned once. For 1 hour deliveries carry signatures for both the new and the\nprevious secret (comma-separated, new first), so receivers can switch without dropping events.","operationId":"rotate_org_webhook_secret","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/webhooks/{webhook_id}/test":{"post":{"tags":["webhooks"],"summary":"Send webhook.test to a organization webhook","description":"Queue a signed `webhook.test` delivery carrying a synthetic fax object, so an integrator can verify\nsignatures before the first real fax. Returns the pending delivery.","operationId":"test_org_webhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/webhooks/{webhook_id}/deliveries":{"get":{"tags":["webhooks"],"summary":"List deliveries of a organization webhook","description":"Delivery rows for this endpoint, newest first, with status, attempt count, and the response excerpt.","operationId":"list_org_webhook_deliveries","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_DeliveryOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver":{"post":{"tags":["webhooks"],"summary":"Redeliver a organization webhook delivery","description":"Send a past delivery again as a new delivery row (`redelivery_of` = the original). The body is the\noriginal envelope, so `delivery_id` inside it is unchanged and receivers can dedupe.","operationId":"redeliver_org_webhook_delivery","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Webhook Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/billing/collection-policy":{"post":{"tags":["billing"],"summary":"Set Org Collection Policy","description":"Organization owner: `prepaid_balance` or `prepaid_autocharge` on the organization payer row or on one of\nits delegated accounts. `postpaid` and credit limits are platform-admin only.","operationId":"set_org_collection_policy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCollectionPolicyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerBillingOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/pricing":{"get":{"tags":["billing"],"summary":"Get Org Pricing","description":"Organization default retail: what an account pays for a component when its own price is left empty.\nNull means this organization has not set a default for that component; `effective_defaults` is what such an\naccount pays now (the platform's standard price for a direct customer, else wholesale).","operationId":"get_org_pricing","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["billing"],"summary":"Update Org Pricing","description":"Organization default retail (what accounts without their own retail pay). Retail below the effective\nwholesale on any component is rejected.","operationId":"update_org_pricing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/billing/refill":{"post":{"tags":["billing"],"summary":"Refill Org Balance","description":"Manual prepaid refill of the organization balance (parent-billed payer). Records a pending refill and\nqueues it; the balance increases only when the processor reports success.","operationId":"refill_org_balance","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefillIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefillOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/usage":{"get":{"tags":["billing"],"summary":"Get Org Usage","description":"Usage of every account in the organization. Resellers also see wholesale and the collected amount.","operationId":"get_org_usage","parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM in the organization timezone","title":"Period"},"description":"YYYY-MM in the organization timezone"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUsage"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/margin":{"get":{"tags":["billing"],"summary":"Get Org Margin","description":"Reseller margin report for the period (wholesale, retail, margin per account; margin entries by status).","operationId":"get_org_margin","parameters":[{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM in the organization timezone","title":"Period"},"description":"YYYY-MM in the organization timezone"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarginReport"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/billing/refill":{"post":{"tags":["billing"],"summary":"Refill Account Balance","description":"Manual prepaid refill of a delegated account's balance.","operationId":"refill_account_balance","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefillIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefillOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/usage":{"get":{"tags":["billing"],"summary":"Get Account Usage","description":"Pages and DID-days rated for this account in the period, at the account's retail price.","operationId":"get_usage","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM in the organization timezone; default the current month","title":"Period"},"description":"YYYY-MM in the organization timezone; default the current month"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUsage"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/brand":{"get":{"tags":["brand"],"summary":"Get Org Brand","description":"The organization's brand: name, colors, support email, sending domain and its verification status,\ncustom hostname, and the address your customers receive notification email from (`sender_address`).","operationId":"get_org_brand","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"tags":["brand"],"summary":"Update Org Brand","description":"Change brand fields (omitted fields keep their value). Setting `mailgun_domain` resets its status to\n`unverified`; a platform admin verifies it.","operationId":"update_org_brand","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/brand/verify-mailgun-domain":{"post":{"tags":["brand"],"summary":"Request Org Mailgun Domain Verification","description":"Record that the owner published the sending-domain DNS and wants it checked. Does not set\n`mailgun_domain_status` to verified: mail keeps the platform address until a platform admin confirms the\ndomain with the mail provider (`POST /admin/orgs/{id}/brand/verify-mailgun-domain`).","operationId":"request_org_mailgun_domain_verification","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOut"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/org/brand/logo":{"post":{"tags":["brand"],"summary":"Upload Org Brand Logo","description":"Replace the logo: raw PNG or JPEG body, at most 1 MiB. Stored at `org/{org_id}/brand/logo`; also used on\ncover pages.","operationId":"upload_org_brand_logo","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"}},"requestBody":{"required":true,"content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}}},"get":{"tags":["brand"],"summary":"Get Org Brand Logo","operationId":"get_org_brand_logo","parameters":[{"name":"redirect","in":"query","required":false,"schema":{"type":"boolean","description":"false: return the URL instead of 302.","default":true,"title":"Redirect"},"description":"false: return the URL instead of 302."}],"responses":{"302":{"description":"Redirect to a 5-minute presigned URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoUrl"}}},"headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"200":{"description":"With redirect=false: the presigned URL as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogoUrl"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/domains":{"get":{"tags":["brand"],"summary":"List Org Domains","description":"Custom app hostnames and their status, with the CNAME the customer must publish.","operationId":"list_org_domains","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainList"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"}}},"post":{"tags":["brand"],"summary":"Create Org Domain","description":"Add a custom app hostname (one per organization). It starts `pending_dns`: publish the returned CNAME.\nIt is served as this organization only once `active`.","operationId":"create_org_domain","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/domains/{domain_id}/refresh":{"post":{"tags":["brand"],"summary":"Refresh Org Domain","description":"Re-read the provider's status (provider-managed hostnames only; otherwise returns the row unchanged).","operationId":"refresh_org_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/domains/{domain_id}":{"delete":{"tags":["brand"],"summary":"Delete Org Domain","description":"Remove a custom hostname. Login and brand on that host fall back to the platform rules immediately in\nthis process and within 60 s (CORS cache) everywhere.","operationId":"delete_org_domain","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/brand":{"get":{"tags":["public"],"summary":"Get Public Brand","description":"Brand for a web host, before login. No credential. An active custom hostname returns that organization's\npublic fields; the platform app host and any unknown host return the platform brand.","operationId":"get_public_brand","parameters":[{"name":"host","in":"query","required":true,"schema":{"type":"string","maxLength":260,"description":"Browser host, e.g. fax.example.com","title":"Host"},"description":"Browser host, e.g. fax.example.com"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBrand"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/brand":{"get":{"tags":["brand"],"summary":"Get Account Brand","description":"Brand of the account's organization (display name, colors, logo URL, support email) for any credential\nthat can see the account. Nothing else of the organization is shown.","operationId":"get_account_brand","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountBrand"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/audit":{"get":{"tags":["organization"],"summary":"Org List Audit","description":"Audit rows for this organization and its accounts, newest first. Filters combine with AND.","operationId":"org_list_audit","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The user, platform user, or API key that acted.","title":"Actor Id"},"description":"The user, platform user, or API key that acted."},{"name":"actor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"user | platform_user | api_key | impersonation | system","title":"Actor Type"},"description":"user | platform_user | api_key | impersonation | system"},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Exact action (`fax.document_read`), or a prefix ending in `.*` (`billing.*`).","title":"Action"},"description":"Exact action (`fax.document_read`), or a prefix ending in `.*` (`billing.*`)."},{"name":"object_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Object Type"}},{"name":"object_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Object Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Rows at or after this instant.","title":"Since"},"description":"Rows at or after this instant."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Rows before this instant.","title":"Until"},"description":"Rows before this instant."},{"name":"impersonation","in":"query","required":false,"schema":{"type":"boolean","description":"Only rows performed through impersonation (and the impersonation start and stop rows).","default":false,"title":"Impersonation"},"description":"Only rows performed through impersonation (and the impersonation start and stop rows)."},{"name":"impersonator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only rows a given platform admin performed while impersonating (or started or stopped).","title":"Impersonator Id"},"description":"Only rows a given platform admin performed while impersonating (or started or stopped)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_AuditOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/audit/export":{"get":{"tags":["organization"],"summary":"Org Export Audit","description":"Download this organization's audit rows (and its accounts') as CSV or JSON, oldest first. Same filters as\n`org_list_audit`; `limit` and `cursor` are ignored. At most 100 000 rows.","operationId":"org_export_audit","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","default":"csv","title":"Format"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}},{"name":"actor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The user, platform user, or API key that acted.","title":"Actor Id"},"description":"The user, platform user, or API key that acted."},{"name":"actor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"description":"user | platform_user | api_key | impersonation | system","title":"Actor Type"},"description":"user | platform_user | api_key | impersonation | system"},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Exact action (`fax.document_read`), or a prefix ending in `.*` (`billing.*`).","title":"Action"},"description":"Exact action (`fax.document_read`), or a prefix ending in `.*` (`billing.*`)."},{"name":"object_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Object Type"}},{"name":"object_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Object Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Rows at or after this instant.","title":"Since"},"description":"Rows at or after this instant."},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Rows before this instant.","title":"Until"},"description":"Rows before this instant."},{"name":"impersonation","in":"query","required":false,"schema":{"type":"boolean","description":"Only rows performed through impersonation (and the impersonation start and stop rows).","default":false,"title":"Impersonation"},"description":"Only rows performed through impersonation (and the impersonation start and stop rows)."},{"name":"impersonator_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only rows a given platform admin performed while impersonating (or started or stopped).","title":"Impersonator Id"},"description":"Only rows a given platform admin performed while impersonating (or started or stopped)."}],"responses":{"200":{"description":"The rows as `text/csv` (one row per audit row, `data` as JSON) or `application/json` (`{\"data\": [AuditOut, ...], \"truncated\": bool}`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditExport","type":"object"}},"text/csv":{"schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/security-policy":{"get":{"tags":["security"],"summary":"Owner Get Org Policy","description":"Your organization's two-step verification requirement and session limits, with the floors that bound them\n(the platform's longest session, and the HIPAA limits while any account is in HIPAA mode).","operationId":"get_org_security_policy","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerOrgSecurityPolicy"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"tags":["security"],"summary":"Owner Update Org Policy","description":"Require two-step verification for everyone in your organization and set its session limits. A field left out\nis kept; `null` removes the organization's limit. The absolute length cannot exceed the platform's (409\n`policy_floor`); while an account is in HIPAA mode the requirement cannot be turned off and the idle and\nrecent-auth limits, when set, must be at most 15 minutes (409 `compliance_locked`). Null restores the\nplatform default; HIPAA accounts retain their own limits. Turning the requirement on\nneeds your own two-step verification first (409 `mfa_not_enrolled`). Existing sessions keep working; the MFA requirement applies at the next sign-in.\nAudited `auth.policy_update`.","operationId":"update_org_security_policy","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgSecurityPolicyPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerOrgSecurityPolicy"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/accounts/{account_id}/security-policy":{"get":{"tags":["security"],"summary":"Owner Get Account Policy","description":"One of your accounts' two-step requirement and session limits, with what its users get (the strictest of\nplatform default, organization and account).","operationId":"get_org_account_security_policy","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerAccountSecurityPolicy"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["security"],"summary":"Owner Update Account Policy","description":"Require two-step verification and set session limits for one account's users. The organization's limits still\napply (the strictest wins). The absolute length cannot exceed the platform's (409 `policy_floor`); while the\naccount is in HIPAA mode two-step verification stays required and the idle and recent-auth limits cannot be\nunset or raised above 15 minutes (409 `compliance_locked`). Audited `auth.policy_update`.","operationId":"update_org_account_security_policy","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSecurityPolicyPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnerAccountSecurityPolicy"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/invoices":{"get":{"tags":["billing"],"summary":"List Account Invoices","description":"Invoices this account pays itself (delegated billing), newest first. A parent-billed account has none: its\norganization is invoiced, and the account gets a retail statement instead.","operationId":"list_account_invoices","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InvoiceOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/invoices/{invoice_id}":{"get":{"tags":["billing"],"summary":"Get Account Invoice","description":"One invoice with its lines (retail amounts).","operationId":"get_account_invoice","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/invoices/{invoice_id}/pdf":{"get":{"tags":["billing"],"summary":"Get Account Invoice Pdf","description":"Download one of this account's invoices as a PDF.","operationId":"get_account_invoice_pdf","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"The invoice PDF, or the same file as base64 when the request accepts only JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePdfFile","type":"object"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/invoices":{"get":{"tags":["billing"],"summary":"List Org Invoices","description":"The organization's invoices (wholesale, for parent-billed accounts and the house account) and the\ninvoices of its delegated accounts, newest first.","operationId":"list_org_invoices","parameters":[{"name":"payer_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["organization","account"],"type":"string"},{"type":"null"}],"description":"organization: the reseller's own (wholesale) invoices; account: invoices of its delegated accounts","title":"Payer Type"},"description":"organization: the reseller's own (wholesale) invoices; account: invoices of its delegated accounts"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_InvoiceOut_"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/invoices/{invoice_id}":{"get":{"tags":["billing"],"summary":"Get Org Invoice","description":"One invoice with its lines grouped by account.","operationId":"get_org_invoice","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetail"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/invoices/{invoice_id}/pdf":{"get":{"tags":["billing"],"summary":"Get Org Invoice Pdf","description":"Download one of the organization's invoices as a PDF.","operationId":"get_org_invoice_pdf","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invoice Id"}}],"responses":{"200":{"description":"The invoice PDF, or the same file as base64 when the request accepts only JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePdfFile","type":"object"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/statements/{period}":{"get":{"tags":["billing"],"summary":"Get Account Statement","description":"The account's retail statement PDF for an ended month: every rated fax page and number-day at the account's\nprice. Parent-billed lines are payable to the organization, not to the platform. Rendered on first request if\nthe billing worker has not produced it yet; 409 `period_not_closed` for the current month.","operationId":"get_account_statement","parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"YYYY-MM, organization timezone","title":"Period"},"description":"YYYY-MM, organization timezone"},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"redirect","in":"query","required":false,"schema":{"type":"boolean","description":"false: return the URL as JSON instead of a 302.","default":true,"title":"Redirect"},"description":"false: return the URL as JSON instead of a 302."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Return PDF bytes directly.","default":false,"title":"Download"},"description":"Return PDF bytes directly."}],"responses":{"302":{"description":"Redirect to a 5-minute presigned URL of the PDF.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementUrl"}}},"headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"200":{"description":"With redirect=false: URL as JSON. With download=true: PDF bytes.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"$ref":"#/components/schemas/StatementUrl"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/accounts/{account_id}/statements/{period}":{"get":{"tags":["billing"],"summary":"Get Org Account Statement","description":"Statement PDF of one of the organization's accounts (what the reseller hands to its customer).","operationId":"get_org_account_statement","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"period","in":"path","required":true,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","description":"YYYY-MM, organization timezone","title":"Period"},"description":"YYYY-MM, organization timezone"},{"name":"redirect","in":"query","required":false,"schema":{"type":"boolean","description":"false: return the URL as JSON instead of a 302.","default":true,"title":"Redirect"},"description":"false: return the URL as JSON instead of a 302."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Return PDF bytes directly.","default":false,"title":"Download"},"description":"Return PDF bytes directly."}],"responses":{"302":{"description":"Redirect to a 5-minute presigned URL of the PDF.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementUrl"}}},"headers":{"Location":{"schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"200":{"description":"With redirect=false: URL as JSON. With download=true: PDF bytes.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"$ref":"#/components/schemas/StatementUrl"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/statement-periods":{"get":{"tags":["billing"],"summary":"List Org Statement Periods","description":"Months that already have a closed statement, newest first, including a month closed before it ended.","operationId":"list_org_statement_periods","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatementPeriodList"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/pricing":{"get":{"tags":["public"],"summary":"Get Public Pricing","description":"Direct-customer retail price per outbound page, inbound page and number-month, and the HIPAA compliance\nadd-on per account-month. No credential.","operationId":"get_public_pricing","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPricing"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/org/compliance":{"get":{"tags":["compliance"],"summary":"Get Org Compliance","description":"The organization's BAA state (current version and its acceptance), which accounts are in HIPAA mode, the\nmonthly price per account and what HIPAA mode changes for users. A direct owner sees only its account.","operationId":"get_org_compliance","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCompliance"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/org/compliance/baa/accept":{"post":{"tags":["compliance"],"summary":"Accept Org Baa","description":"Accept the current BAA for the organization: checkbox (`agree: true`) and the accepting person's typed\nname. Only an organization owner signed in as themselves (no API key, no impersonation). Records the version,\nthe SHA-256 of the exact text, the time and the IP; audit-logged as `compliance.baa_accept`.","operationId":"accept_org_baa","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaaAccept"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaaAcceptanceOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/org/compliance/baa/acceptances/{acceptance_id}/document":{"get":{"tags":["compliance"],"summary":"Download Org Baa","description":"A copy of the BAA text the organization accepted, followed by the acceptance record (who, when, version,\nSHA-256, IP).","operationId":"download_org_baa","parameters":[{"name":"acceptance_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Acceptance Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["markdown","json"],"type":"string","default":"markdown","title":"Format"}}],"responses":{"200":{"description":"The accepted BAA with its acceptance record, `text/markdown` (default) or JSON with `format=json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaaFile","type":"object"}},"text/markdown":{"schema":{"type":"string"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/legal":{"get":{"tags":["public"],"summary":"List Public Legal Documents","description":"The current version of each customer-facing legal document that has been published (kinds with no\npublished version are absent). No credential.","operationId":"list_public_legal_documents","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalDocumentList"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/public/legal/{kind}":{"get":{"tags":["public"],"summary":"Get Public Legal Document","description":"The current version of one legal document, with its markdown text. 404 until a version is published.\nNo credential.","operationId":"get_public_legal_document","parameters":[{"name":"kind","in":"path","required":true,"schema":{"enum":["terms-of-service","privacy-policy","acceptable-use"],"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalDocumentOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/start":{"post":{"tags":["signup"],"summary":"Start Signup","description":"Step 1 of the self-service sign-up: checks the form, then prepares the card form (saved for later charges;\nnothing is charged). Nothing is stored in our database yet. 409 `email_in_use` when the email already has a\nlogin; 429 past the per-address limit; 503 when card payments are not configured. The same `Idempotency-Key`\nreplays the same card form.","operationId":"start_signup","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStart"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStarted"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/complete":{"post":{"tags":["signup"],"summary":"Complete Signup","description":"Step 2, after the browser confirmed the card: creates the direct organization, its trial account (prepaid\nbalance with the trial credit, card on file), the owner login (`pending_verification`), records the Terms of\nService and Privacy Policy acceptances and mails the verification link. Idempotent by the sign-up token:\nrepeating it for the same sign-up (with or without the same `Idempotency-Key`) returns the same result.","operationId":"complete_signup","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupComplete"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupCompleted"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/verify":{"post":{"tags":["signup"],"summary":"Verify Signup Email","description":"The link from the verification mail: activates the owner login (single use). Then sign in normally.","operationId":"verify_signup_email","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupVerify"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupVerified"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/signup/resend-verification":{"post":{"tags":["signup"],"summary":"Resend Signup Verification","description":"Mail a fresh confirmation link to a sign-up that has not been confirmed (earlier links stop working).\nAlways 202.","operationId":"resend_signup_verification","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerification"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}},"400":{"description":"Bad Request","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Forbidden","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not Found","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/trial":{"get":{"tags":["trial"],"summary":"Get Trial Status","description":"Whether the account is in its signup trial, what it may still send today, the shared trial number, the\ncredit left, and whether it can send at all (`sending_disabled_reason`, also `no_from_number` for an account\nwithout a number). Includes the top-up defaults for converting to pay as you go.","operationId":"get_trial_status","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialStatus"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/billing/convert":{"post":{"tags":["trial"],"summary":"Convert Trial","description":"End the trial: charge an initial top-up (at least TRIAL_TOPUP_MIN_CENTS; the screens prefill\nTRIAL_TOPUP_DEFAULT_CENTS) to the saved card and add it to the balance, turn automatic refill on\n(TRIAL_RECHARGE_THRESHOLD_CENTS / TRIAL_RECHARGE_AMOUNT_CENTS unless already set), lift the trial limits and\nmail a receipt. Requires `Idempotency-Key`; the same key reports the same payment. 402 `payment_failed` when\nthe card is refused (the trial stays).","operationId":"convert_trial","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accounts/{account_id}/numbers/claim":{"post":{"tags":["trial"],"summary":"Claim Number","description":"Direct customers: take the next available number from the platform's inventory (it becomes the default\nsending number when there is none). Billed per day at the number's monthly price. Numbers are assigned by the\nplatform and are not portable. 409 `trial_conversion_required` while the account is in its trial.","operationId":"claim_number","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"description":"Replays the original create response for 24 hours.","title":"Idempotency-Key"},"description":"Replays the original create response for 24 hours."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOut"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"409":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Conflict"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"purpose":{"type":"string","enum":["invite","password_reset"],"title":"Purpose","default":"invite"},"token":{"type":"string","title":"Token"},"password":{"type":"string","maxLength":1024,"minLength":12,"title":"Password"}},"type":"object","required":["token","password"],"title":"AcceptInviteRequest"},"AcceptInviteResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["user_id","status"],"title":"AcceptInviteResponse"},"Accepted":{"properties":{"status":{"type":"string","title":"Status","description":"Always accepted: the response does not reveal whether the email has a pending sign-up.","default":"accepted"}},"type":"object","title":"Accepted"},"AccountApiKeyCreate":{"properties":{"label":{"type":"string","maxLength":100,"title":"Label","default":""},"scopes":{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1,"title":"Scopes"},"cidr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cidr","description":"Optional source allow-list; requests outside it get 403."},"test":{"type":"boolean","title":"Test","description":"bfx_test_ sandbox key: never dials, never charges.","default":false}},"type":"object","required":["scopes"],"title":"AccountApiKeyCreate"},"AccountBilling":{"properties":{"minimum_commitment_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Commitment Cents"},"minimum_commitment_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Minimum Commitment Effective At"},"billing_mode":{"type":"string","title":"Billing Mode"},"billing_mode_pending":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Mode Pending"},"billing_mode_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Billing Mode Effective At"},"payer_type":{"type":"string","enum":["organization","account"],"title":"Payer Type"},"processor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processor"},"collection_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Policy"},"balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance Cents"},"credit_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Limit Cents"},"auto_recharge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Recharge"},"recharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Threshold Cents"},"recharge_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Amount Cents"},"autocharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Autocharge Threshold Cents"},"retail_outbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Outbound Page Cents"},"retail_inbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Inbound Page Cents"},"retail_did_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Did Monthly Cents"},"retail_hipaa_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Hipaa Monthly Cents"},"organization_kind":{"anyOf":[{"type":"string","enum":["reseller","direct"]},{"type":"null"}],"title":"Organization Kind","description":"`direct`: the account belongs to a direct customer of the platform."},"effective_prices":{"additionalProperties":{"$ref":"#/components/schemas/EffectivePrice"},"type":"object","title":"Effective Prices","description":"Keyed `outbound_page_cents`, `inbound_page_cents`, `did_monthly_cents`, `hipaa_monthly_cents`: the price applied when the account is rated now (account price, else organization default, else the platform's standard price)."},"has_payment_method":{"type":"boolean","title":"Has Payment Method","description":"Delegated accounts: a card is saved (refills and auto-recharge charge it). False for parent-billed accounts.","default":false},"payments_enabled":{"type":"boolean","title":"Payments Enabled","description":"True when this account pays for itself (delegated) and its processor is configured on this installation, so card setup, refills, auto-recharge and `prepaid_autocharge` can work. False for parent-billed accounts (the organization pays).","default":false}},"type":"object","required":["billing_mode","billing_mode_pending","billing_mode_effective_at","payer_type","processor","collection_policy","balance_cents","credit_limit_cents","auto_recharge","recharge_threshold_cents","recharge_amount_cents","autocharge_threshold_cents","retail_outbound_page_cents","retail_inbound_page_cents","retail_did_monthly_cents"],"title":"AccountBilling","description":"Read-only billing view. A parent-billed account sees that its organization pays, not the org's balance.\n`retail_*` are the account's own prices (null = not set); `effective_prices` are what is actually charged."},"AccountBrand":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"display_name":{"type":"string","title":"Display Name"},"primary_color":{"type":"string","title":"Primary Color"},"accent_color":{"type":"string","title":"Accent Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url","description":"5-minute presigned GET, or null."},"support_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Email"}},"type":"object","required":["organization_id","display_name","primary_color","accent_color","logo_url","support_email"],"title":"AccountBrand","description":"The account's organization brand as an account user sees it: public fields only. Colors fall back to the\nplatform colors and the name to the organization name, as on the login page."},"AccountCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"billing_mode":{"type":"string","enum":["parent_billed","delegated"],"title":"Billing Mode","default":"parent_billed"},"retail_outbound_page_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Outbound Page Cents"},"retail_inbound_page_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Inbound Page Cents"},"retail_did_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Did Monthly Cents"},"retail_hipaa_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Hipaa Monthly Cents","description":"HIPAA compliance add-on, per month, while the account is in HIPAA mode."},"page_cap":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Page Cap"},"page_cap_behavior":{"type":"string","enum":["hard_stop","soft_notify"],"title":"Page Cap Behavior","default":"hard_stop"}},"type":"object","required":["name"],"title":"AccountCreate"},"AccountOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"public_id":{"type":"string","title":"Public Id"},"name":{"type":"string","title":"Name"},"is_house":{"type":"boolean","title":"Is House"},"status":{"type":"string","title":"Status"},"billing_mode":{"type":"string","title":"Billing Mode"},"billing_mode_pending":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Mode Pending"},"billing_mode_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Billing Mode Effective At"},"retail_outbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Outbound Page Cents"},"retail_inbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Inbound Page Cents"},"retail_did_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Did Monthly Cents"},"retail_hipaa_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Hipaa Monthly Cents"},"retail_custom_domain_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Custom Domain Monthly Cents"},"page_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Cap"},"page_cap_behavior":{"type":"string","title":"Page Cap Behavior"},"max_pages_per_fax":{"type":"integer","title":"Max Pages Per Fax"},"max_concurrent_outbound":{"type":"integer","title":"Max Concurrent Outbound"},"max_dids":{"type":"integer","title":"Max Dids"},"max_users":{"type":"integer","title":"Max Users"},"allow_alternate_route_failover":{"type":"boolean","title":"Allow Alternate Route Failover","description":"When true, a fax that cannot be delivered on its primary route is retried automatically on an alternate carrier network (the fax shows status `alternate_route`). Caller ID may differ on the alternate network (the attempt reports `caller_id_delivery` `not_guaranteed`)."},"retention_days":{"type":"integer","title":"Retention Days"},"retention_hold":{"type":"boolean","title":"Retention Hold"},"sandbox":{"type":"boolean","title":"Sandbox","description":"Set by a platform admin: every fax created on this account, by any credential, is a sandbox fax (never dials, never bills).","default":false},"document_access_mode":{"type":"string","enum":["redirect","logged_stream"],"title":"Document Access Mode","description":"`redirect` (default): the document endpoint answers 302 to a 5-minute presigned URL. `logged_stream`: the authenticated request receives the bytes and `redirect=false` returns a single-use 60-second link, so no replayable URL is ever issued. Set by a platform admin.","default":"redirect"},"notification_mode":{"type":"string","enum":["attachment","link_only"],"title":"Notification Mode","description":"`attachment` (default): fax-received mail attaches the PDF when it fits. `link_only`: the mail never carries the document, only a link to the web app, which requires sign-in.","default":"attachment"},"retention_floor_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retention Floor Days","description":"Minimum for `retention_days`, set by a platform admin; null = none. `retention_days` cannot be set below it."},"legal_hold":{"type":"boolean","title":"Legal Hold","description":"Set by a platform admin: while true, nothing on the account is deleted, neither by retention nor by a user, until a platform admin clears it.","default":false},"legal_hold_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Legal Hold At"},"hipaa_enabled":{"type":"boolean","title":"Hipaa Enabled","description":"HIPAA mode (paid add-on, needs the organization's accepted BAA): forces link-only notifications, logged document access, a retention floor of at least 2190 days, two-step verification and 15-minute idle and re-authentication limits. Turned on by an organization owner or a platform admin; turned off by a platform admin only.","default":false},"hipaa_enabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Hipaa Enabled At"},"trial":{"type":"boolean","title":"Trial","description":"Signup trial (self sign-up): sends from a shared trial number with daily limits until it converts to pay as you go. See `GET /v1/accounts/{account_id}/trial`.","default":false},"trial_converted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Converted At","description":"When the trial ended (converted)."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","organization_id","public_id","name","is_house","status","billing_mode","billing_mode_pending","billing_mode_effective_at","retail_outbound_page_cents","retail_inbound_page_cents","retail_did_monthly_cents","page_cap","page_cap_behavior","max_pages_per_fax","max_concurrent_outbound","max_dids","max_users","allow_alternate_route_failover","retention_days","retention_hold","created_at"],"title":"AccountOut"},"AccountPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","suspended"]},{"type":"null"}],"title":"Status"},"billing_mode":{"anyOf":[{"type":"string","enum":["parent_billed","delegated"]},{"type":"null"}],"title":"Billing Mode"},"retail_outbound_page_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Outbound Page Cents"},"retail_inbound_page_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Inbound Page Cents"},"retail_did_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Did Monthly Cents"},"retail_hipaa_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Retail Hipaa Monthly Cents","description":"HIPAA compliance add-on, per month, while the account is in HIPAA mode."},"page_cap":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Page Cap"},"page_cap_behavior":{"anyOf":[{"type":"string","enum":["hard_stop","soft_notify"]},{"type":"null"}],"title":"Page Cap Behavior"},"max_pages_per_fax":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Pages Per Fax"},"max_concurrent_outbound":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Concurrent Outbound"},"max_dids":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Dids"},"max_users":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Users"},"allow_alternate_route_failover":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Alternate Route Failover","description":"When true, a fax that cannot be delivered on its primary route is retried automatically on an alternate carrier network (the fax shows status `alternate_route`). Caller ID may differ on the alternate network (the attempt reports `caller_id_delivery` `not_guaranteed`)."},"hipaa_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hipaa Enabled","description":"true turns HIPAA mode on (organization owners; the organization must have accepted the current BAA, else 409 `baa_required`). Turning it off is for the platform (403 `admin_required`)."}},"type":"object","title":"AccountPatch","description":"Org-owner fields. billing_mode is scheduled (billing_mode_pending) for the next period, never in force now."},"AccountSecurityPolicyPatch":{"properties":{"mfa_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mfa Required"},"session_idle_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Session Idle Minutes","description":"HIPAA target: 15."},"session_absolute_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":1.0},{"type":"null"}],"title":"Session Absolute Hours"},"recent_auth_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Recent Auth Minutes","description":"HIPAA target: 15."},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"AccountSecurityPolicyPatch"},"AccountSettings":{"properties":{"cover_template":{"$ref":"#/components/schemas/CoverTemplate"},"retention_days":{"type":"integer","title":"Retention Days"},"retention_floor_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retention Floor Days","description":"Minimum for `retention_days`, set by a platform admin; null = none. `retention_days` cannot be set below it. Read-only here."},"legal_hold":{"type":"boolean","title":"Legal Hold","description":"Set by a platform admin: while true, nothing on the account is deleted, neither by retention nor by a user, until a platform admin clears it. Read-only here.","default":false},"retention_hold":{"type":"boolean","title":"Retention Hold","description":"Set by a platform administrator: retention deletion is suspended and documents cannot be deleted until it is cleared. Read-only here.","default":false},"notification_mode":{"type":"string","enum":["attachment","link_only"],"title":"Notification Mode","description":"`attachment` (default): fax-received mail attaches the PDF when it fits. `link_only`: the mail never carries the document, only a link to the web app, which requires sign-in.","default":"attachment"},"document_access_mode":{"type":"string","enum":["redirect","logged_stream"],"title":"Document Access Mode","description":"`redirect` (default): the document endpoint answers 302 to a 5-minute presigned URL. `logged_stream`: the authenticated request receives the bytes and `redirect=false` returns a single-use 60-second link, so no replayable URL is ever issued. Set by a platform admin. Read-only here.","default":"redirect"},"locked_settings":{"items":{"type":"string"},"type":"array","title":"Locked Settings","description":"Settings fixed by the account's compliance policy; changing them answers 403 `compliance_locked`."},"hipaa_enabled":{"type":"boolean","title":"Hipaa Enabled","description":"HIPAA mode (paid add-on, needs the organization's accepted BAA): forces link-only notifications, logged document access, a retention floor of at least 2190 days, two-step verification and 15-minute idle and re-authentication limits. Turned on by an organization owner or a platform admin; turned off by a platform admin only.","default":false},"hipaa_enabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Hipaa Enabled At"},"baa_accepted":{"type":"boolean","title":"Baa Accepted","description":"The organization has accepted the current BAA version.","default":false},"baa_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baa Version","description":"The BAA version the organization accepted last."},"hipaa_enforced":{"items":{"type":"string"},"type":"array","title":"Hipaa Enforced","description":"Controls HIPAA mode enforces on this account (empty when it is off)."},"default_from_did_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default From Did Id"},"email_to_fax_allowlist":{"items":{"type":"string"},"type":"array","title":"Email To Fax Allowlist","description":"Sender addresses allowed to email-to-fax. Empty means disabled."},"notification_defaults":{"$ref":"#/components/schemas/NotificationDefaults"},"email_to_fax_address":{"type":"string","title":"Email To Fax Address","description":"Send a document here to fax it: a.{public_id}@fax.<base-domain>."},"email_to_fax_shared_domain":{"type":"boolean","title":"Email To Fax Shared Domain","description":"True: the address is on the service's shared mail domain (there is no per-organization inbound mail domain today).","default":true},"white_label":{"type":"boolean","title":"White Label","description":"True when the account belongs to a reseller: screens describe shared addresses without naming the platform.","default":false},"email_to_fax_enabled":{"type":"boolean","title":"Email To Fax Enabled","description":"True only when the platform flag is on, the platform can verify sender DKIM, and this account's allowlist is not empty."}},"type":"object","required":["cover_template","retention_days","default_from_did_id","email_to_fax_address","email_to_fax_enabled"],"title":"AccountSettings"},"AccountUsage":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"period":{"type":"string","title":"Period"},"lines":{"items":{"$ref":"#/components/schemas/UsageLine"},"type":"array","title":"Lines"},"retail_cents":{"type":"integer","title":"Retail Cents"},"page_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Page Cap","description":"Pages per month (outbound + inbound); null means unlimited."},"page_cap_behavior":{"type":"string","title":"Page Cap Behavior","description":"`hard_stop` rejects past the cap; `soft_notify` only notifies."},"pages_rated_this_period":{"type":"integer","title":"Pages Rated This Period","description":"Pages rated since the start of the current month (organization timezone)."},"pages_on_hold":{"type":"integer","title":"Pages On Hold","description":"Pages admitted but not yet rated (in-flight faxes)."},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining","description":"page_cap - rated - on hold, floored at 0; null when unlimited."}},"type":"object","required":["account_id","period","lines","retail_cents","page_cap","page_cap_behavior","pages_rated_this_period","pages_on_hold","remaining"],"title":"AccountUsage","description":"What this account used in the period, at its own (retail) price. No wholesale. The cap fields describe the\ncurrent period whatever `period` was asked for (the cap applies to the month in progress)."},"ApiKeyCreate":{"properties":{"label":{"type":"string","maxLength":100,"title":"Label","default":""},"scopes":{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1,"title":"Scopes"},"cidr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cidr","description":"Optional source allow-list; requests outside it get 403."}},"type":"object","required":["scopes"],"title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"level":{"type":"string","title":"Level"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"prefix":{"type":"string","title":"Prefix"},"hint":{"type":"string","title":"Hint","description":"prefix + lookup; enough to recognise a key, useless to authenticate"},"label":{"type":"string","title":"Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"cidr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cidr"},"sandbox":{"type":"boolean","title":"Sandbox"},"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"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key","description":"The full secret. Shown once; null on an idempotent replay."}},"type":"object","required":["id","level","organization_id","account_id","prefix","hint","label","scopes","cidr","sandbox","created_at","last_used_at","revoked_at","key"],"title":"ApiKeyCreated"},"ApiKeyOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"level":{"type":"string","title":"Level"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"prefix":{"type":"string","title":"Prefix"},"hint":{"type":"string","title":"Hint","description":"prefix + lookup; enough to recognise a key, useless to authenticate"},"label":{"type":"string","title":"Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"cidr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cidr"},"sandbox":{"type":"boolean","title":"Sandbox"},"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"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","level","organization_id","account_id","prefix","hint","label","scopes","cidr","sandbox","created_at","last_used_at","revoked_at"],"title":"ApiKeyOut"},"ArchiveReason":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason","description":"Why. Recorded on the audit row."}},"additionalProperties":false,"type":"object","required":["reason"],"title":"ArchiveReason"},"AttemptOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sequence":{"type":"integer","title":"Sequence"},"kind":{"type":"string","enum":["sip","onnet","alternate_route"],"title":"Kind","description":"`sip`: a call over the primary carrier routes. `onnet`: delivered directly to another account on this platform, no call placed. `alternate_route`: delivery on an alternate carrier network."},"state":{"type":"string","title":"State"},"failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Class"},"caller_id_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id Delivery"},"pages_transferred":{"type":"integer","title":"Pages Transferred"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"}},"type":"object","required":["id","sequence","kind","state","failure_class","caller_id_delivery","pages_transferred","duration_seconds","started_at","ended_at"],"title":"AttemptOut","description":"Tenant view of one attempt: outcome class and caller-ID delivery, no internal routing details or raw\nsignalling text."},"AuditExport":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditOut"},"type":"array","title":"Data"},"truncated":{"type":"boolean","title":"Truncated","description":"More than 100 000 rows matched; narrow with `since`/`until`."}},"type":"object","required":["data","truncated"],"title":"AuditExport","description":"`format=json` body. `format=csv` is `text/csv` with the same rows (columns below, `data` as JSON)."},"AuditOut":{"properties":{"id":{"type":"integer","title":"Id"},"at":{"type":"string","format":"date-time","title":"At"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"action":{"type":"string","title":"Action"},"object_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Type"},"object_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Id"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"actor_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Email","description":"The acting user's or platform admin's email, when the actor is a person."},"via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Via","description":"`impersonation` when a platform admin performed the action while acting as the organization or a user."},"impersonator_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Impersonator Id"},"impersonator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonator Email"},"acting_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Acting As","description":"Impersonation rows: the user email, account name, or organization name the platform admin was acting as."},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"}},"type":"object","required":["id","at","actor_type","actor_id","organization_id","account_id","action","object_type","object_id","ip","data"],"title":"AuditOut"},"BaaAccept":{"properties":{"version":{"type":"string","maxLength":40,"minLength":1,"title":"Version","description":"The version shown (must be the current one)."},"typed_name":{"type":"string","maxLength":200,"minLength":1,"title":"Typed Name","description":"The full name of the person accepting."},"agree":{"type":"boolean","const":true,"title":"Agree","description":"Must be true: the person has read and agrees to the BAA."}},"type":"object","required":["version","typed_name","agree"],"title":"BaaAccept"},"BaaAcceptanceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id","description":"null: the acceptance covers the whole organization."},"version":{"type":"string","title":"Version"},"accepted_at":{"type":"string","format":"date-time","title":"Accepted At"},"accepted_by_user_id":{"type":"string","format":"uuid","title":"Accepted By User Id"},"accepted_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accepted By Email"},"typed_name":{"type":"string","title":"Typed Name"},"document_sha256":{"type":"string","title":"Document Sha256"},"current":{"type":"boolean","title":"Current","description":"This acceptance is of the BAA version currently published."}},"type":"object","required":["id","organization_id","account_id","version","accepted_at","accepted_by_user_id","accepted_by_email","typed_name","document_sha256","current"],"title":"BaaAcceptanceOut"},"BaaDocumentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"version":{"type":"string","title":"Version"},"title":{"type":"string","title":"Title"},"body_markdown":{"type":"string","title":"Body Markdown"},"sha256":{"type":"string","title":"Sha256","description":"SHA-256 (hex) of `body_markdown`; recorded on every acceptance."},"published_at":{"type":"string","format":"date-time","title":"Published At"},"published_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Published By"}},"type":"object","required":["id","version","title","body_markdown","sha256","published_at"],"title":"BaaDocumentOut"},"BaaFile":{"properties":{"filename":{"type":"string","title":"Filename"},"content_markdown":{"type":"string","title":"Content Markdown"}},"type":"object","required":["filename","content_markdown"],"title":"BaaFile","description":"`format=json` body. The default is the file itself (`text/markdown`)."},"BrandOut":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"display_name":{"type":"string","title":"Display Name"},"primary_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Color"},"accent_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent Color"},"support_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Email"},"email_from_local_part":{"type":"string","title":"Email From Local Part"},"mailgun_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailgun Domain"},"mailgun_domain_status":{"type":"string","enum":["unverified","verified"],"title":"Mailgun Domain Status"},"mailgun_dns_records":{"items":{"$ref":"#/components/schemas/DnsRecord"},"type":"array","title":"Mailgun Dns Records","description":"Records to publish for mailgun_domain. Empty when no domain is set. The DKIM TXT value is null: the mail provider issues it per domain, and it is not stored here."},"app_hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Hostname","description":"The organization's active custom app hostname, if any."},"has_logo":{"type":"boolean","title":"Has Logo"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url","description":"5-minute presigned GET for the logo, or null."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"sender_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Address","description":"The From address of this organization's notification email (fax received, delivered, failed; invitations). Its own sending domain once verified, otherwise the platform notification address. Recipients should allow-list it. Null only when platform mail is not configured."},"sender_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Display Name","description":"Display name on notification email."},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To","description":"Reply-To on notification email (the support email)."},"sender_shared_domain":{"type":"boolean","title":"Sender Shared Domain","description":"True when the From address is on the service's shared sending domain.","default":false},"white_label":{"type":"boolean","title":"White Label","description":"True for a reseller's organization.","default":false}},"type":"object","required":["organization_id","display_name","primary_color","accent_color","support_email","email_from_local_part","mailgun_domain","mailgun_domain_status","app_hostname","has_logo","logo_url","updated_at"],"title":"BrandOut"},"BrandUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"primary_color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Primary Color"},"accent_color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}],"title":"Accent Color"},"support_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Support Email"},"email_from_local_part":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email From Local Part"},"mailgun_domain":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}],"title":"Mailgun Domain","description":"e.g. mg.example.com"}},"additionalProperties":false,"type":"object","title":"BrandUpdate","description":"Fields omitted keep their current value; null clears a nullable field. A new `mailgun_domain` is\n`unverified` until a platform admin verifies it; until then mail is sent From the platform domain."},"CardSetupOut":{"properties":{"payer_type":{"type":"string","title":"Payer Type"},"payer_id":{"type":"string","format":"uuid","title":"Payer Id"},"stripe_customer_id":{"type":"string","title":"Stripe Customer Id"},"setup_intent_id":{"type":"string","title":"Setup Intent Id"},"client_secret":{"type":"string","title":"Client Secret","description":"Pass to Stripe.js `confirmCardSetup`. Card details go to Stripe only."},"usage":{"type":"string","title":"Usage","description":"Always `off_session`: the saved card may be charged without the payer present."},"status":{"type":"string","title":"Status"}},"type":"object","required":["payer_type","payer_id","stripe_customer_id","setup_intent_id","client_secret","usage","status"],"title":"CardSetupOut"},"CommitmentOut":{"properties":{"period":{"type":"string","title":"Period","description":"YYYY-MM in the organization timezone."},"commitment_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Commitment Cents","description":"The monthly commitment; null when there is none."},"effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective At","description":"When the commitment starts."},"period_commitment_cents":{"type":"integer","title":"Period Commitment Cents","description":"The commitment for this period, prorated by day when it started (or the organization was created) part-way through."},"counted_cents":{"type":"integer","title":"Counted Cents","description":"Charges in the period that count toward the commitment, so far."},"projected_shortfall_cents":{"type":"integer","title":"Projected Shortfall Cents","description":"period_commitment_cents - counted_cents, floored at 0: what period close would add if nothing more were used."},"booked_shortfall_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booked Shortfall Cents","description":"The shortfall charged at this period's close; null until then (or when there was none)."},"starts_after_period":{"type":"boolean","title":"Starts After Period","description":"True when the commitment is scheduled: it starts at `effective_at`, after this period, so nothing is owed toward it in this period.","default":false}},"type":"object","required":["period","commitment_cents","effective_at","period_commitment_cents","counted_cents","projected_shortfall_cents","booked_shortfall_cents"],"title":"CommitmentOut","description":"The organization's minimum monthly commitment for one period (default the current org-local month)."},"ConnectOnboardingOut":{"properties":{"stripe_connect_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Connect Account Id","description":"The organization's Express account, once created."},"details_submitted":{"type":"boolean","title":"Details Submitted"},"charges_enabled":{"type":"boolean","title":"Charges Enabled"},"payouts_enabled":{"type":"boolean","title":"Payouts Enabled","description":"Margin payouts (Connect transfers) run only while this is true."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When these flags were last copied from Stripe."},"onboarding_url":{"type":"string","title":"Onboarding Url","description":"Single-use Stripe-hosted onboarding link (Account Link). Redirect the org owner to it; it expires within minutes, so request a new one rather than storing it."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"return_url":{"type":"string","title":"Return Url"},"refresh_url":{"type":"string","title":"Refresh Url"}},"type":"object","required":["stripe_connect_account_id","details_submitted","charges_enabled","payouts_enabled","updated_at","onboarding_url","expires_at","return_url","refresh_url"],"title":"ConnectOnboardingOut"},"ConnectStatusOut":{"properties":{"stripe_connect_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Connect Account Id","description":"The organization's Express account, once created."},"details_submitted":{"type":"boolean","title":"Details Submitted"},"charges_enabled":{"type":"boolean","title":"Charges Enabled"},"payouts_enabled":{"type":"boolean","title":"Payouts Enabled","description":"Margin payouts (Connect transfers) run only while this is true."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When these flags were last copied from Stripe."}},"type":"object","required":["stripe_connect_account_id","details_submitted","charges_enabled","payouts_enabled","updated_at"],"title":"ConnectStatusOut"},"ContactIn":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name","default":""},"company":{"type":"string","maxLength":200,"title":"Company","default":""},"fax_e164":{"type":"string","maxLength":32,"title":"Fax E164"}},"additionalProperties":false,"type":"object","required":["fax_e164"],"title":"ContactIn"},"ContactOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"company":{"type":"string","title":"Company"},"fax_e164":{"type":"string","title":"Fax E164"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","company","fax_e164","created_at"],"title":"ContactOut"},"ContactPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"fax_e164":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Fax E164"}},"additionalProperties":false,"type":"object","title":"ContactPatch"},"ConversionIn":{"properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents","description":"Initial top-up charged to the saved card (at least TRIAL_TOPUP_MIN_CENTS)."}},"type":"object","required":["amount_cents"],"title":"ConversionIn"},"ConversionOut":{"properties":{"status":{"type":"string","enum":["converted","processing"],"title":"Status","description":"`processing`: the card payment is still being confirmed; the account converts when it succeeds."},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"trial":{"type":"boolean","title":"Trial"},"balance_cents":{"type":"integer","title":"Balance Cents"},"auto_recharge":{"type":"boolean","title":"Auto Recharge"},"recharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Threshold Cents"},"recharge_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Amount Cents"},"refill_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Refill Id"},"amount_cents":{"type":"integer","title":"Amount Cents"}},"type":"object","required":["status","account_id","trial","balance_cents","auto_recharge","recharge_threshold_cents","recharge_amount_cents","refill_id","amount_cents"],"title":"ConversionOut"},"CoverIn":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"line1":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Line1"},"line2":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Line2"},"line3":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Line3"}},"additionalProperties":false,"type":"object","title":"CoverIn","description":"Optional cover page. Lines left null use the account's cover template; the logo is the template's only."},"CoverTemplate":{"properties":{"include_logo":{"type":"boolean","title":"Include Logo","default":true},"line1":{"type":"string","maxLength":120,"title":"Line1","default":""},"line2":{"type":"string","maxLength":120,"title":"Line2","default":""},"line3":{"type":"string","maxLength":120,"title":"Line3","default":""}},"additionalProperties":false,"type":"object","title":"CoverTemplate"},"DeliveryOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"event":{"type":"string","title":"Event"},"status":{"type":"string","title":"Status","description":"pending | delivered | failed (will retry) | dead (retries exhausted)"},"attempt":{"type":"integer","title":"Attempt"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Code"},"response_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Excerpt","description":"First 1 KB of the receiver's response body."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"redelivery_of":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Redelivery Of"},"fax_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Fax Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload","description":"The exact JSON body that is signed and POSTed."}},"type":"object","required":["id","endpoint_id","event","status","attempt","next_attempt_at","last_attempt_at","response_code","response_excerpt","created_at","delivered_at","redelivery_of","fax_id","payload"],"title":"DeliveryOut"},"DidGrantsIn":{"properties":{"did_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"title":"Did Ids","description":"Empty: the user may use every account DID."}},"type":"object","required":["did_ids"],"title":"DidGrantsIn"},"DidGrantsOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"did_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Did Ids"}},"type":"object","required":["user_id","did_ids"],"title":"DidGrantsOut"},"DnsRecord":{"properties":{"type":{"type":"string","title":"Type"},"name":{"type":"string","title":"Name"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"purpose":{"type":"string","title":"Purpose"}},"type":"object","required":["type","name","value","purpose"],"title":"DnsRecord"},"DocumentUrl":{"properties":{"url":{"type":"string","title":"Url","description":"Where to fetch the document. `redirect` accounts: a presigned GET valid 5 minutes. `logged_stream` accounts: a single-use link valid 60 seconds (a second fetch answers 410). Not stored anywhere."},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"content_type":{"type":"string","title":"Content Type"},"filename":{"type":"string","title":"Filename"},"delivery":{"type":"string","title":"Delivery","description":"`redirect` (presigned URL) or `link` (single-use link; the account's `document_access_mode` is `logged_stream`).","default":"redirect"}},"type":"object","required":["url","expires_at","content_type","filename"],"title":"DocumentUrl"},"DomainCreate":{"properties":{"hostname":{"type":"string","maxLength":253,"minLength":4,"title":"Hostname","description":"e.g. fax.example.com"},"ssl_method":{"type":"string","enum":["http","txt"],"title":"Ssl Method","description":"Certificate validation method requested from the TLS provider (flag on).","default":"http"}},"additionalProperties":false,"type":"object","required":["hostname"],"title":"DomainCreate"},"DomainList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DomainOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"DomainList"},"DomainOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"hostname":{"type":"string","title":"Hostname"},"status":{"type":"string","enum":["pending_dns","pending_validation","active","failed","disabled"],"title":"Status"},"provider_managed":{"type":"boolean","title":"Provider Managed","description":"True when the platform manages the hostname's certificate and validation automatically."},"dns_records":{"items":{"$ref":"#/components/schemas/DnsRecord"},"type":"array","title":"Dns Records","description":"Records the customer must publish. Always the CNAME to the platform's fallback origin."},"validation_records":{"items":{"$ref":"#/components/schemas/DnsRecord"},"type":"array","title":"Validation Records","description":"Provider ownership/certificate records, as returned by the provider on create or refresh (flag on only). Not stored."},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","organization_id","hostname","status","provider_managed","dns_records","created_at"],"title":"DomainOut"},"EffectiveDefault":{"properties":{"cents":{"type":"integer","title":"Cents"},"source":{"type":"string","enum":["organization","platform","wholesale"],"title":"Source","description":"`organization`: the default set here; `platform`: the platform's standard price (direct customers); `wholesale`: no default set, accounts pay the organization's wholesale."}},"type":"object","required":["cents","source"],"title":"EffectiveDefault"},"EffectivePrice":{"properties":{"cents":{"type":"integer","title":"Cents","description":"Per page for page components, per month for monthly ones."},"source":{"type":"string","enum":["account","organization","platform"],"title":"Source","description":"`account`: this account's own price; `organization`: the organization's default price; `platform`: the platform's standard price (direct customers)."}},"type":"object","required":["cents","source"],"title":"EffectivePrice","description":"The price this account is charged for one component right now, and where it comes from."},"FaxCreate":{"properties":{"to":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"To","description":"E.164 destination. Required unless contact_id."},"from_did_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Did Id","description":"A DID assigned to this account. Defaults to the account's default_from_did_id. A trial account omits it: its faxes go out from the shared trial number."},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id","description":"Send to this contact's fax number instead of to."},"cover":{"$ref":"#/components/schemas/CoverIn"},"content_ref":{"type":"string","format":"uuid","title":"Content Ref","description":"From POST /v1/accounts/{account_id}/uploads (1 hour, single use)."},"quality":{"type":"string","enum":["standard","fine"],"title":"Quality","default":"fine"},"client_reference":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client Reference"}},"additionalProperties":false,"type":"object","required":["content_ref"],"title":"FaxCreate"},"FaxEventOut":{"properties":{"at":{"type":"string","format":"date-time","title":"At"},"from_status":{"anyOf":[{"type":"string","enum":["queued","rendering","rejected","admitted","originating","negotiating","transmitting","retrying","alternate_route","succeeded","failed","cancelled","expired"]},{"type":"null"}],"title":"From Status","description":"Status before the transition (null for the first event). Same values as `FaxOut.status`."},"to_status":{"type":"string","enum":["queued","rendering","rejected","admitted","originating","negotiating","transmitting","retrying","alternate_route","succeeded","failed","cancelled","expired"],"title":"To Status","description":"Fax state. `queued` and `rendering` precede admission; `rejected` means admission denied (see `reject_reason`). In flight: `admitted`, `originating`, `negotiating`, `transmitting`, `retrying` (waiting for the next attempt), and `alternate_route` (delivery on an alternate carrier network after the primary routes failed; caller ID is then `not_guaranteed`). Terminal: `succeeded`, `failed`, `cancelled`, `expired`."},"attempt_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Attempt Id"},"failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Class","description":"Outcome class that caused it, if any."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Reject / expiry reason code, if any."}},"type":"object","required":["at","from_status","to_status","attempt_id"],"title":"FaxEventOut","description":"One status transition of the fax, as its tenant may see it: the two states, the attempt it belongs to, and\nthe outcome class or reject reason. No internal routing, network, or payer details."},"FaxForward":{"properties":{"to":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"To","description":"E.164 destination. Required unless contact_id."},"from_did_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Did Id","description":"A DID assigned to this account. Defaults to the account's default_from_did_id."},"contact_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Contact Id","description":"Send to this contact's fax number instead of to."},"cover":{"$ref":"#/components/schemas/CoverIn"},"quality":{"type":"string","enum":["standard","fine"],"title":"Quality","default":"fine"},"client_reference":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client Reference"}},"additionalProperties":false,"type":"object","title":"FaxForward","description":"Send a stored fax's document to another destination as a new outbound fax."},"FaxLinks":{"properties":{"self":{"type":"string","title":"Self"},"attempts":{"type":"string","title":"Attempts"},"document":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document","description":"Null until the canonical TIFF exists."}},"type":"object","required":["self","attempts","document"],"title":"FaxLinks","description":"API URLs that require the caller's own credential. Never presigned object URLs."},"FaxOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["queued","rendering","rejected","admitted","originating","negotiating","transmitting","retrying","alternate_route","succeeded","failed","cancelled","expired"],"title":"Status","description":"Fax state. `queued` and `rendering` precede admission; `rejected` means admission denied (see `reject_reason`). In flight: `admitted`, `originating`, `negotiating`, `transmitting`, `retrying` (waiting for the next attempt), and `alternate_route` (delivery on an alternate carrier network after the primary routes failed; caller ID is then `not_guaranteed`). Terminal: `succeeded`, `failed`, `cancelled`, `expired`."},"direction":{"type":"string","title":"Direction"},"to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"},"did_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Did Id"},"caller_id_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id Delivery"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages"},"pages_delivered":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages Delivered"},"retail_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Cents"},"sandbox":{"type":"boolean","title":"Sandbox"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Class"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"},"client_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Reference"},"attempt_count":{"type":"integer","title":"Attempt Count","description":"Delivery attempts made so far (rows in list_attempts).","default":0},"last_failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure Class","description":"Failure class of the most recent attempt that failed, null if none has."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"content_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Content Deleted At","description":"When the stored document was deleted. Null while the document is still available."},"links":{"$ref":"#/components/schemas/FaxLinks"}},"type":"object","required":["id","status","direction","to","from","did_id","caller_id_delivery","pages","pages_delivered","retail_cents","sandbox","read_at","failure_class","reject_reason","client_reference","created_at","completed_at","links"],"title":"FaxOut","description":"Tenant fax schema (create, list, get, and the webhook body). No wholesale, keys, or provider internals."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImpersonationInfo":{"properties":{"mode":{"type":"string","title":"Mode","description":"account | organization | user"},"impersonator_id":{"type":"string","format":"uuid","title":"Impersonator Id"},"impersonator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonator Email"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"session_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Session Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"When the impersonation session ends."}},"type":"object","required":["mode","impersonator_id","organization_id"],"title":"ImpersonationInfo","description":"Who is acting as whom, for the tenant app's impersonation banner."},"InvoiceDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"payer_type":{"type":"string","enum":["organization","account"],"title":"Payer Type"},"payer_id":{"type":"string","format":"uuid","title":"Payer Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"processor":{"type":"string","enum":["stripe","square"],"title":"Processor"},"kind":{"type":"string","enum":["period","threshold"],"title":"Kind"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"First org-local date of the period (period invoices)."},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"First org-local date after the period (exclusive)."},"threshold_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Threshold Sequence"},"status":{"type":"string","enum":["draft","open","paid","uncollectible","void"],"title":"Status"},"currency":{"type":"string","title":"Currency"},"total_cents":{"type":"integer","title":"Total Cents"},"early":{"type":"boolean","title":"Early","description":"True when this invoice closes a period that has not ended (a partial period).","default":false},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url","description":"The processor's pay page, when it returned one."},"invoice_pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"lines":{"items":{"$ref":"#/components/schemas/InvoiceLine"},"type":"array","title":"Lines"},"payer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payer Name","description":"The paying organization or account's name."},"external_payment_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Payment Ref","description":"A payment reference recorded by hand, when one exists."},"funds_confirmed":{"type":"boolean","title":"Funds Confirmed","description":"True once money for that external payment has arrived.","default":false}},"type":"object","required":["id","payer_type","payer_id","organization_id","processor","kind","period_start","period_end","threshold_sequence","status","currency","total_cents","hosted_invoice_url","created_at","finalized_at","due_at","paid_at","lines"],"title":"InvoiceDetail"},"InvoiceLine":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"account_name":{"type":"string","title":"Account Name"},"description":{"type":"string","title":"Description","description":"`Account {name}` for usage, or `Minimum monthly commitment shortfall` for the line that tops the period up to the organization's commitment."},"outbound_pages":{"type":"integer","title":"Outbound Pages"},"inbound_pages":{"type":"integer","title":"Inbound Pages"},"did_days":{"type":"integer","title":"Did Days"},"hipaa_days":{"type":"integer","title":"Hipaa Days","description":"HIPAA compliance add-on days on this line.","default":0},"custom_domain_days":{"type":"integer","title":"Custom Domain Days","description":"Custom hostname days on this line.","default":0},"adjustment_cents":{"type":"integer","title":"Adjustment Cents"},"amount_cents":{"type":"integer","title":"Amount Cents","description":"What the payer owes for this account's events on this invoice."}},"type":"object","required":["account_id","account_name","description","outbound_pages","inbound_pages","did_days","adjustment_cents","amount_cents"],"title":"InvoiceLine"},"InvoiceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"payer_type":{"type":"string","enum":["organization","account"],"title":"Payer Type"},"payer_id":{"type":"string","format":"uuid","title":"Payer Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"processor":{"type":"string","enum":["stripe","square"],"title":"Processor"},"kind":{"type":"string","enum":["period","threshold"],"title":"Kind"},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"First org-local date of the period (period invoices)."},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"First org-local date after the period (exclusive)."},"threshold_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Threshold Sequence"},"status":{"type":"string","enum":["draft","open","paid","uncollectible","void"],"title":"Status"},"currency":{"type":"string","title":"Currency"},"total_cents":{"type":"integer","title":"Total Cents"},"early":{"type":"boolean","title":"Early","description":"True when this invoice closes a period that has not ended (a partial period).","default":false},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url","description":"The processor's pay page, when it returned one."},"invoice_pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"finalized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finalized At"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["id","payer_type","payer_id","organization_id","processor","kind","period_start","period_end","threshold_sequence","status","currency","total_cents","hosted_invoice_url","created_at","finalized_at","due_at","paid_at"],"title":"InvoiceOut"},"InvoicePdfFile":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","const":"application/pdf","title":"Content Type","default":"application/pdf"},"content_base64":{"type":"string","title":"Content Base64"}},"type":"object","required":["id","filename","content_base64"],"title":"InvoicePdfFile","description":"JSON form of an invoice PDF, used when the caller accepts only JSON."},"LegalDocumentList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LegalDocumentSummary"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"LegalDocumentList"},"LegalDocumentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"title":{"type":"string","title":"Title"},"sha256":{"type":"string","title":"Sha256","description":"SHA-256 (hex) of the markdown body; record it with an acceptance."},"published_at":{"type":"string","format":"date-time","title":"Published At"},"body_markdown":{"type":"string","title":"Body Markdown"},"published_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Published By"}},"type":"object","required":["id","kind","version","title","sha256","published_at","body_markdown"],"title":"LegalDocumentOut"},"LegalDocumentSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"title":{"type":"string","title":"Title"},"sha256":{"type":"string","title":"Sha256","description":"SHA-256 (hex) of the markdown body; record it with an acceptance."},"published_at":{"type":"string","format":"date-time","title":"Published At"}},"type":"object","required":["id","kind","version","title","sha256","published_at"],"title":"LegalDocumentSummary"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Needed only when the same email exists in several organizations."}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"session_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Token"},"session_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Session Expires At"},"principal_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Principal Id"},"mfa_required":{"type":"boolean","title":"Mfa Required","description":"Second step needed: send `mfa_token` and a code from the authenticator (or a recovery code) to /v1/auth/mfa/verify.","default":false},"mfa_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Token","description":"Short-lived (MFA_CHALLENGE_TTL_MINUTES) challenge token."},"mfa_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mfa Token Expires At"},"mfa_enrollment_required":{"type":"boolean","title":"Mfa Enrollment Required","description":"Signed in, but the session can only enroll two-step verification (`/auth/mfa/enroll`, `/auth/mfa/enroll/confirm`) or sign out until it does.","default":false},"password_change_required":{"type":"boolean","title":"Password Change Required","description":"Platform admin signed in with a generated or reset password. The session can change it (`POST /admin/auth/password`) or sign out; the rest of /admin answers 403 `password_change_required` until it does.","default":false}},"type":"object","title":"LoginResponse","description":"A session, or (when the login has two-step verification) a challenge to complete with\n`POST /v1/auth/mfa/verify`. With `mfa_required` every session field is null."},"LogoUrl":{"properties":{"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"}},"type":"object","required":["url","expires_at","content_type"],"title":"LogoUrl"},"MarginAccount":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"account_name":{"type":"string","title":"Account Name"},"account_archived":{"type":"boolean","title":"Account Archived"},"billing_mode":{"type":"string","title":"Billing Mode"},"wholesale_cents":{"type":"integer","title":"Wholesale Cents"},"retail_cents":{"type":"integer","title":"Retail Cents"},"margin_cents":{"type":"integer","title":"Margin Cents"}},"type":"object","required":["account_id","account_name","account_archived","billing_mode","wholesale_cents","retail_cents","margin_cents"],"title":"MarginAccount"},"MarginReport":{"properties":{"period":{"type":"string","title":"Period"},"wholesale_cents":{"type":"integer","title":"Wholesale Cents"},"retail_cents":{"type":"integer","title":"Retail Cents"},"margin_cents":{"type":"integer","title":"Margin Cents"},"entries":{"additionalProperties":{"type":"integer"},"type":"object","title":"Entries","description":"margin_entries amount by status for events in the period"},"accounts":{"items":{"$ref":"#/components/schemas/MarginAccount"},"type":"array","title":"Accounts"},"unpriced_events":{"type":"integer","title":"Unpriced Events","description":"Events in the period rated at $0 because no price was in force when they happened; they add nothing to the totals.","default":0}},"type":"object","required":["period","wholesale_cents","retail_cents","margin_cents","entries","accounts"],"title":"MarginReport","description":"Reseller margin: retail − wholesale per account. Parent-billed margin is realized by the reseller's own\nbilling (report only); delegated margin has `margin_entries` rows whose status totals are `entries`."},"Me":{"properties":{"mfa_required_next_sign_in":{"type":"boolean","title":"Mfa Required Next Sign In","description":"This session has grace; set up two-step verification before the next sign-in.","default":false},"session_server_time":{"type":"string","format":"date-time","title":"Session Server Time"},"session_idle_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Idle Minutes","description":"Effective session idle policy; null = no idle limit."},"session_idle_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Session Idle Expires At","description":"Server deadline based on foreground activity."},"kind":{"type":"string","title":"Kind"},"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"User or platform admin email (for an impersonation token, the impersonating admin's). Null for API keys."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"User name, or the API key's label. Null for platform admins."},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"key_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Level"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]},"sandbox":{"type":"boolean","title":"Sandbox","default":false},"brand":{"anyOf":[{"$ref":"#/components/schemas/AccountBrand"},{"type":"null"}],"description":"The caller's organization brand with platform fallbacks (same object as `GET /v1/accounts/{id}/brand`), so the web app can theme the platform host without another call. Null for platform credentials."},"impersonation":{"anyOf":[{"$ref":"#/components/schemas/ImpersonationInfo"},{"type":"null"}],"description":"Set only for an impersonation token: the platform admin and the organization, account or user being acted as."}},"type":"object","required":["kind","id"],"title":"Me"},"MfaCode":{"properties":{"code":{"type":"string","maxLength":32,"minLength":6,"title":"Code","description":"6-digit authenticator code."}},"type":"object","required":["code"],"title":"MfaCode"},"MfaConfirmed":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes","description":"Ten single-use codes. Shown once; stored hashed."},"status":{"$ref":"#/components/schemas/MfaStatus"}},"type":"object","required":["recovery_codes","status"],"title":"MfaConfirmed"},"MfaEnrollment":{"properties":{"secret":{"type":"string","title":"Secret","description":"Base32 secret for manual entry. Shown only now; stored encrypted."},"otpauth_uri":{"type":"string","title":"Otpauth Uri","description":"otpauth://totp/… URI to render as a QR code."},"issuer":{"type":"string","title":"Issuer"},"digits":{"type":"integer","title":"Digits","default":6},"period":{"type":"integer","title":"Period","default":30}},"type":"object","required":["secret","otpauth_uri","issuer"],"title":"MfaEnrollment"},"MfaReauth":{"properties":{"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Code","description":"Authenticator or recovery code; required when two-step verification is on."}},"type":"object","required":["password"],"title":"MfaReauth"},"MfaStatus":{"properties":{"enrolled":{"type":"boolean","title":"Enrolled","description":"A confirmed authenticator is required at every sign-in."},"pending":{"type":"boolean","title":"Pending","description":"Enrollment started but not confirmed with a code yet."},"required":{"type":"boolean","title":"Required","description":"The organization, account or platform requires two-step verification."},"enrollment_required":{"type":"boolean","title":"Enrollment Required","description":"This session can only enroll (or sign out) until it does."},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"recovery_codes_remaining":{"type":"integer","title":"Recovery Codes Remaining","default":0},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"The login the factor belongs to (the authenticator label)."}},"type":"object","required":["enrolled","pending","required","enrollment_required"],"title":"MfaStatus"},"MfaVerifyRequest":{"properties":{"mfa_token":{"type":"string","maxLength":4000,"minLength":10,"title":"Mfa Token","description":"From sign-in (`mfa_required: true`)."},"code":{"type":"string","maxLength":32,"minLength":6,"title":"Code","description":"6-digit authenticator code, or a recovery code."}},"type":"object","required":["mfa_token","code"],"title":"MfaVerifyRequest"},"NotificationDefaults":{"properties":{"email_on_received":{"type":"boolean","title":"Email On Received","default":true},"email_on_succeeded":{"type":"boolean","title":"Email On Succeeded","default":true},"email_on_failed":{"type":"boolean","title":"Email On Failed","default":true}},"additionalProperties":false,"type":"object","title":"NotificationDefaults","description":"What a user without its own notification_preferences row receives."},"NumberOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"e164":{"type":"string","title":"E164"},"label":{"type":"string","title":"Label"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"},"is_default":{"type":"boolean","title":"Is Default","description":"This is the account's default_from_did_id."},"email_recipients":{"items":{"$ref":"#/components/schemas/Recipient"},"type":"array","title":"Email Recipients"}},"type":"object","required":["id","e164","label","assigned_at","is_default","email_recipients"],"title":"NumberOut"},"NumberPatch":{"properties":{"label":{"type":"string","maxLength":120,"title":"Label"}},"additionalProperties":false,"type":"object","required":["label"],"title":"NumberPatch"},"OrgAccountUsage":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"account_name":{"type":"string","title":"Account Name"},"account_archived":{"type":"boolean","title":"Account Archived"},"billing_mode":{"type":"string","title":"Billing Mode"},"lines":{"items":{"$ref":"#/components/schemas/OrgUsageLine"},"type":"array","title":"Lines"}},"type":"object","required":["account_id","account_name","account_archived","billing_mode","lines"],"title":"OrgAccountUsage"},"OrgAssign":{"properties":{"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id","description":"Target account in this organization; null returns the DID to the organization pool."}},"type":"object","required":["account_id"],"title":"OrgAssign"},"OrgBaa":{"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/BaaDocumentOut"},{"type":"null"}],"description":"The BAA to accept; null until the platform publishes one."},"acceptance":{"anyOf":[{"$ref":"#/components/schemas/BaaAcceptanceOut"},{"type":"null"}],"description":"The organization's acceptance at the current version, else its latest one."},"accepted_current":{"type":"boolean","title":"Accepted Current"}},"type":"object","required":["current","acceptance","accepted_current"],"title":"OrgBaa"},"OrgCollectionPolicyIn":{"properties":{"confirm":{"type":"boolean","const":true,"title":"Confirm","description":"Must be true: changing how a payer is charged spends money."},"collection_policy":{"type":"string","enum":["prepaid_balance","prepaid_autocharge","postpaid"],"title":"Collection Policy"},"credit_limit_cents":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Credit Limit Cents","description":"Required for postpaid."},"autocharge_threshold_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Autocharge Threshold Cents"},"auto_recharge":{"type":"boolean","title":"Auto Recharge","default":false},"recharge_threshold_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Recharge Threshold Cents"},"recharge_amount_cents":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Recharge Amount Cents"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id","description":"A delegated account of this organization; omit for the organization payer row."}},"type":"object","required":["confirm","collection_policy"],"title":"OrgCollectionPolicyIn"},"OrgCompliance":{"properties":{"baa":{"$ref":"#/components/schemas/OrgBaa"},"hipaa_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hipaa Monthly Cents","description":"What one account pays per month for HIPAA mode (the organization's price for a new account); billed per day."},"accounts":{"items":{"$ref":"#/components/schemas/OrgComplianceAccount"},"type":"array","title":"Accounts"},"what_changes":{"items":{"type":"string"},"type":"array","title":"What Changes","description":"What HIPAA mode changes for the account's users."}},"type":"object","required":["baa","hipaa_monthly_cents","accounts","what_changes"],"title":"OrgCompliance"},"OrgComplianceAccount":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"name":{"type":"string","title":"Name"},"is_house":{"type":"boolean","title":"Is House"},"hipaa_enabled":{"type":"boolean","title":"Hipaa Enabled"},"hipaa_enabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Hipaa Enabled At"}},"type":"object","required":["account_id","name","is_house","hipaa_enabled","hipaa_enabled_at"],"title":"OrgComplianceAccount"},"OrgDidOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"e164":{"type":"string","title":"E164"},"status":{"type":"string","title":"Status"},"assigned_account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Assigned Account Id"},"assigned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Assigned At"},"label":{"type":"string","title":"Label"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","e164","status","assigned_account_id","assigned_at","label","created_at"],"title":"OrgDidOut","description":"Organization view: the number itself, without carrier or routing identifiers."},"OrgDidPatch":{"properties":{"label":{"type":"string","maxLength":120,"title":"Label","description":"A name for the number (e.g. \"Front desk\"); empty clears it."}},"additionalProperties":false,"type":"object","required":["label"],"title":"OrgDidPatch"},"OrgFaxOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["queued","rendering","rejected","admitted","originating","negotiating","transmitting","retrying","alternate_route","succeeded","failed","cancelled","expired"],"title":"Status","description":"Fax state. `queued` and `rendering` precede admission; `rejected` means admission denied (see `reject_reason`). In flight: `admitted`, `originating`, `negotiating`, `transmitting`, `retrying` (waiting for the next attempt), and `alternate_route` (delivery on an alternate carrier network after the primary routes failed; caller ID is then `not_guaranteed`). Terminal: `succeeded`, `failed`, `cancelled`, `expired`."},"direction":{"type":"string","title":"Direction"},"to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"},"did_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Did Id"},"caller_id_delivery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id Delivery"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages"},"pages_delivered":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages Delivered"},"retail_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Cents"},"sandbox":{"type":"boolean","title":"Sandbox"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Class"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"},"client_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Reference"},"attempt_count":{"type":"integer","title":"Attempt Count","description":"Delivery attempts made so far (rows in list_attempts).","default":0},"last_failure_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Failure Class","description":"Failure class of the most recent attempt that failed, null if none has."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"content_deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Content Deleted At","description":"When the stored document was deleted. Null while the document is still available."},"links":{"$ref":"#/components/schemas/FaxLinks"},"account_id":{"type":"string","format":"uuid","title":"Account Id"}},"type":"object","required":["id","status","direction","to","from","did_id","caller_id_delivery","pages","pages_delivered","retail_cents","sandbox","read_at","failure_class","reject_reason","client_reference","created_at","completed_at","links","account_id"],"title":"OrgFaxOut","description":"The tenant fax object plus the account it belongs to (deep links from organization screens)."},"OrgOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"timezone":{"type":"string","title":"Timezone"},"billing_processor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Processor","description":"Organization payer's processor (`stripe` | `square`). Reseller organizations only; null for direct customers."},"collection_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Policy","description":"Organization payer's collection policy. Reseller organizations only; null for direct customers."},"balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance Cents","description":"Organization prepaid balance. Reseller organizations only; null for direct customers."},"credit_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Limit Cents","description":"Postpaid credit limit (null when not postpaid). Null for direct customers."},"ceiling_concurrent_outbound":{"type":"integer","title":"Ceiling Concurrent Outbound"},"ceiling_dids":{"type":"integer","title":"Ceiling Dids"},"ceiling_users":{"type":"integer","title":"Ceiling Users"},"minimum_commitment_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Minimum Commitment Cents","description":"Minimum monthly commitment in cents; null when there is none. If the organization's charges for a month come to less, the difference is charged at period close. Set only by the platform."},"minimum_commitment_effective_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Minimum Commitment Effective At","description":"When the commitment starts; a month it starts part-way through is prorated by day. Null when there is no commitment."},"auto_recharge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Recharge","description":"Organization payer: top up the prepaid balance automatically. Null for direct customers."},"recharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Threshold Cents","description":"Auto-recharge when the balance falls below this. Null for direct customers."},"recharge_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Amount Cents","description":"Auto-recharge amount. Null for direct customers."},"autocharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Autocharge Threshold Cents","description":"`prepaid_autocharge`: uninvoiced charges allowed before the card is charged. Null for direct customers."},"payments_enabled":{"type":"boolean","title":"Payments Enabled","description":"True when the organization payer's processor is configured on this installation, so card setup, refills, auto-recharge and `prepaid_autocharge` can work. Always false for direct customers (their payer is the account: see `GET /v1/accounts/{id}/billing`).","default":false},"has_payment_method":{"type":"boolean","title":"Has Payment Method","description":"A card is saved for the organization payer (refills and auto-recharge charge it). Always false for direct customers.","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","name","status","timezone","billing_processor","collection_policy","balance_cents","credit_limit_cents","ceiling_concurrent_outbound","ceiling_dids","ceiling_users","created_at"],"title":"OrgOut","description":"Organization as its own staff see it (no wholesale overrides).\n\nThe payer figures (`billing_processor`, `collection_policy`, `balance_cents`, `credit_limit_cents`) describe\nthe organization payer row, which pays only for a reseller's parent-billed accounts. A direct customer's payer\nis its account, so for a direct organization they are null here: read `GET /v1/accounts/{id}/billing`."},"OrgSecurityPolicyPatch":{"properties":{"mfa_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mfa Required"},"session_idle_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Session Idle Minutes","description":"HIPAA target: 15."},"session_absolute_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":1.0},{"type":"null"}],"title":"Session Absolute Hours"},"recent_auth_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Recent Auth Minutes"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"OrgSecurityPolicyPatch"},"OrgUsage":{"properties":{"period":{"type":"string","title":"Period"},"accounts":{"items":{"$ref":"#/components/schemas/OrgAccountUsage"},"type":"array","title":"Accounts"}},"type":"object","required":["period","accounts"],"title":"OrgUsage"},"OrgUsageLine":{"properties":{"kind":{"type":"string","title":"Kind"},"events":{"type":"integer","title":"Events"},"pages":{"type":"integer","title":"Pages"},"retail_cents":{"type":"integer","title":"Retail Cents"},"unpriced_events":{"type":"integer","title":"Unpriced Events","description":"Events of this line rated at $0 because no price was in force when they happened (before any rate was set).","default":0},"unpriced_pages":{"type":"integer","title":"Unpriced Pages","description":"Pages of those unpriced events.","default":0},"collection_cents":{"type":"integer","title":"Collection Cents","description":"What the payer owes for these events."},"wholesale_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wholesale Cents","description":"Reseller organizations only; null for direct customers."}},"type":"object","required":["kind","events","pages","retail_cents","collection_cents","wholesale_cents"],"title":"OrgUsageLine"},"OrgUserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","maxLength":200,"title":"Name","default":""},"role":{"type":"string","enum":["org_owner","org_billing"],"title":"Role","description":"`org_billing`: invoices, margin, refill and usage; cannot send, change the brand, or mint keys.","default":"org_billing"}},"type":"object","required":["email"],"title":"OrgUserCreate"},"OrgUserPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string","enum":["org_owner","org_billing"]},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"OrgUserPatch"},"OwnerAccountSecurityPolicy":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"mfa_required":{"type":"boolean","title":"Mfa Required"},"hipaa_enabled":{"type":"boolean","title":"Hipaa Enabled","description":"While on, `session_idle_minutes` and `recent_auth_minutes` cannot be unset or raised above 15.","default":false},"session_idle_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Idle Minutes","description":"The account's own idle limit for its users; null = none at the account level."},"session_absolute_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Absolute Hours","description":"The account's own longest session; null = none at the account level."},"recent_auth_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recent Auth Minutes","description":"The account's own recent-auth window; null = none at the account level."},"effective_session_idle_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effective Session Idle Minutes","description":"What the account's users get: the strictest of platform default, organization and account."},"effective_session_absolute_hours":{"type":"integer","title":"Effective Session Absolute Hours","default":0},"effective_recent_auth_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Effective Recent Auth Minutes"},"max_session_absolute_hours":{"type":"integer","title":"Max Session Absolute Hours","description":"The platform's longest session.","default":0}},"type":"object","required":["account_id","organization_id","mfa_required"],"title":"OwnerAccountSecurityPolicy"},"OwnerOrgSecurityPolicy":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"mfa_required":{"type":"boolean","title":"Mfa Required","description":"Every user of the organization must use two-step verification."},"accounts_requiring_mfa":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Accounts Requiring Mfa","description":"Accounts that require it for their own users."},"session_idle_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Idle Minutes","description":"Sign out after this much inactivity; null = no idle limit. An account can set a stricter value for its own users."},"session_absolute_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Absolute Hours","description":"Longest session; null = the platform default."},"effective_session_absolute_hours":{"type":"integer","title":"Effective Session Absolute Hours"},"recent_auth_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recent Auth Minutes","description":"Upper bound on how old a sign-in may be for sensitive actions (document downloads); null = each route's own."},"hipaa_accounts":{"type":"integer","title":"Hipaa Accounts","description":"Accounts of the organization in HIPAA mode. While any is, the organization's HIPAA floor applies (see `hipaa_*`)."},"hipaa_session_idle_minutes":{"type":"integer","title":"Hipaa Session Idle Minutes","description":"Most idle minutes allowed while a HIPAA floor applies."},"hipaa_recent_auth_minutes":{"type":"integer","title":"Hipaa Recent Auth Minutes","description":"Longest recent-auth window while a HIPAA floor applies."},"max_session_absolute_hours":{"type":"integer","title":"Max Session Absolute Hours","description":"The platform's longest session; owners can only shorten."}},"type":"object","required":["organization_id","mfa_required","accounts_requiring_mfa","session_idle_minutes","session_absolute_hours","effective_session_absolute_hours","recent_auth_minutes","hipaa_accounts","hipaa_session_idle_minutes","hipaa_recent_auth_minutes","max_session_absolute_hours"],"title":"OwnerOrgSecurityPolicy"},"Page_AccountOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AccountOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[AccountOut]"},"Page_ApiKeyOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[ApiKeyOut]"},"Page_AttemptOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AttemptOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[AttemptOut]"},"Page_AuditOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/AuditOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[AuditOut]"},"Page_ContactOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ContactOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[ContactOut]"},"Page_DeliveryOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeliveryOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[DeliveryOut]"},"Page_FaxEventOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FaxEventOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[FaxEventOut]"},"Page_FaxOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FaxOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[FaxOut]"},"Page_InvoiceOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/InvoiceOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[InvoiceOut]"},"Page_NumberOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NumberOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[NumberOut]"},"Page_OrgDidOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrgDidOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[OrgDidOut]"},"Page_UserOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[UserOut]"},"Page_WebhookOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookOut"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"Page[WebhookOut]"},"PasswordChange":{"properties":{"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"code":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Code","description":"Authenticator or recovery code; required when two-step verification is on."},"new_password":{"type":"string","maxLength":1024,"minLength":12,"title":"New Password"}},"type":"object","required":["password","new_password"],"title":"PasswordChange"},"PasswordChanged":{"properties":{"status":{"type":"string","const":"changed","title":"Status"}},"type":"object","required":["status"],"title":"PasswordChanged"},"PasswordResetAccepted":{"properties":{"status":{"type":"string","title":"Status","description":"Always accepted: the response does not reveal whether the email has a login.","default":"accepted"}},"type":"object","title":"PasswordResetAccepted"},"PasswordResetRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Only that organization's login (the same email may exist in several)."}},"type":"object","required":["email"],"title":"PasswordResetRequest"},"PayerBillingOut":{"properties":{"payer_type":{"type":"string","enum":["organization","account"],"title":"Payer Type"},"payer_id":{"type":"string","format":"uuid","title":"Payer Id"},"billing_processor":{"type":"string","title":"Billing Processor"},"collection_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Collection Policy"},"balance_cents":{"type":"integer","title":"Balance Cents"},"credit_limit_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Limit Cents"},"autocharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Autocharge Threshold Cents"},"auto_recharge":{"type":"boolean","title":"Auto Recharge"},"recharge_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Threshold Cents"},"recharge_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recharge Amount Cents"}},"type":"object","required":["payer_type","payer_id","billing_processor","collection_policy","balance_cents","credit_limit_cents","autocharge_threshold_cents","auto_recharge","recharge_threshold_cents","recharge_amount_cents"],"title":"PayerBillingOut"},"PreferencesIn":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id","description":"Defaults to the calling user. Required for keys."},"email_on_received":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email On Received"},"email_on_succeeded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email On Succeeded"},"email_on_failed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email On Failed"}},"additionalProperties":false,"type":"object","title":"PreferencesIn"},"PreferencesOut":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email_on_received":{"type":"boolean","title":"Email On Received"},"email_on_succeeded":{"type":"boolean","title":"Email On Succeeded"},"email_on_failed":{"type":"boolean","title":"Email On Failed"},"is_default":{"type":"boolean","title":"Is Default","description":"True when the user has no row and the account defaults apply."},"sender_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Address","description":"The From address these emails come from. Add it to your safe-sender / allow list so fax notifications are never filtered. Null only when platform mail is not configured."},"sender_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Display Name","description":"Display name on these emails."},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To","description":"Reply-To on these emails (the support email)."},"sender_shared_domain":{"type":"boolean","title":"Sender Shared Domain","description":"True when the From address is on the service's shared sending domain.","default":false},"white_label":{"type":"boolean","title":"White Label","description":"True when the account belongs to a reseller.","default":false}},"type":"object","required":["user_id","email_on_received","email_on_succeeded","email_on_failed","is_default"],"title":"PreferencesOut"},"PricingOut":{"properties":{"default_retail_outbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Retail Outbound Page Cents"},"default_retail_inbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Retail Inbound Page Cents"},"default_retail_did_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Retail Did Monthly Cents"},"default_retail_hipaa_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Retail Hipaa Monthly Cents"},"default_retail_custom_domain_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Retail Custom Domain Monthly Cents"},"effective_defaults":{"additionalProperties":{"$ref":"#/components/schemas/EffectiveDefault"},"type":"object","title":"Effective Defaults","description":"Keyed by component (`outbound_page_cents`, ...): what an account with no price of its own pays now. Price forms use it as the placeholder."}},"type":"object","required":["default_retail_outbound_page_cents","default_retail_inbound_page_cents","default_retail_did_monthly_cents"],"title":"PricingOut"},"PricingPatch":{"properties":{"default_retail_outbound_page_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Default Retail Outbound Page Cents"},"default_retail_inbound_page_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Default Retail Inbound Page Cents"},"default_retail_did_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Default Retail Did Monthly Cents"},"default_retail_hipaa_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Default Retail Hipaa Monthly Cents","description":"HIPAA compliance add-on, per account per month."},"default_retail_custom_domain_monthly_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Default Retail Custom Domain Monthly Cents"}},"type":"object","title":"PricingPatch","description":"Organization default retail. Null clears a default (accounts then fall back to wholesale)."},"Problem":{"properties":{"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"status":{"type":"integer","title":"Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance"},"code":{"type":"string","title":"Code"}},"type":"object","required":["type","title","status","code"],"title":"Problem"},"PublicBrand":{"properties":{"display_name":{"type":"string","title":"Display Name"},"primary_color":{"type":"string","title":"Primary Color"},"accent_color":{"type":"string","title":"Accent Color"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url","description":"5-minute presigned GET, or null."},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Set only when the host is an active custom hostname."},"custom_hostname":{"type":"boolean","title":"Custom Hostname"},"source":{"type":"string","enum":["platform","custom","unknown"],"title":"Source"}},"type":"object","required":["display_name","primary_color","accent_color","logo_url","organization_id","custom_hostname","source"],"title":"PublicBrand","description":"What the login page may show before authentication. Nothing about users or emails."},"PublicPricing":{"properties":{"currency":{"type":"string","title":"Currency","default":"usd"},"outbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outbound Page Cents"},"inbound_page_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbound Page Cents"},"did_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Did Monthly Cents"},"hipaa_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hipaa Monthly Cents","description":"HIPAA compliance add-on, per account per month; null while not published."},"configured":{"type":"boolean","title":"Configured","description":"False while any of the page and number components is not published yet."}},"type":"object","required":["outbound_page_cents","inbound_page_cents","did_monthly_cents","configured"],"title":"PublicPricing","description":"The platform's direct-customer retail price. Never a wholesale number."},"ReauthResult":{"properties":{"authenticated_at":{"type":"string","format":"date-time","title":"Authenticated At"}},"type":"object","required":["authenticated_at"],"title":"ReauthResult"},"Recipient":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"}},"additionalProperties":false,"type":"object","title":"Recipient"},"RecipientsIn":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/Recipient"},"type":"array","maxItems":50,"title":"Recipients","description":"Empty: inbound mail goes to every account admin."}},"type":"object","required":["recipients"],"title":"RecipientsIn"},"RecoveryCodes":{"properties":{"recovery_codes":{"items":{"type":"string"},"type":"array","title":"Recovery Codes","description":"Ten single-use codes. Shown once; stored hashed."}},"type":"object","required":["recovery_codes"],"title":"RecoveryCodes"},"RefillIn":{"properties":{"amount_cents":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount Cents","description":"At least PREPAID_MIN_REFILL_CENTS."}},"type":"object","required":["amount_cents"],"title":"RefillIn"},"RefillOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"payer_type":{"type":"string","enum":["organization","account"],"title":"Payer Type"},"payer_id":{"type":"string","format":"uuid","title":"Payer Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"processor":{"type":"string","title":"Processor"},"status":{"type":"string","title":"Status"},"kind":{"type":"string","title":"Kind"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","payer_type","payer_id","amount_cents","processor","status","kind","created_at"],"title":"RefillOut"},"ResendVerification":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerification"},"SessionList":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionOut"},"type":"array","title":"Sessions"}},"type":"object","required":["sessions"],"title":"SessionList"},"SessionOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip","description":"Client address recorded when this session was opened."},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent","description":"User-Agent recorded when this session was opened, on one line. The console summarizes it as a device."},"current":{"type":"boolean","title":"Current","description":"True for the session that called this route."}},"type":"object","required":["id","created_at","last_seen_at","current"],"title":"SessionOut"},"SessionTokenRequest":{"properties":{"session_token":{"type":"string","maxLength":200,"minLength":10,"title":"Session Token"}},"type":"object","required":["session_token"],"title":"SessionTokenRequest"},"SessionsRevoked":{"properties":{"sessions_ended":{"type":"integer","title":"Sessions Ended"}},"type":"object","required":["sessions_ended"],"title":"SessionsRevoked"},"SettingsPatch":{"properties":{"cover_template":{"anyOf":[{"$ref":"#/components/schemas/CoverTemplate"},{"type":"null"}]},"retention_days":{"anyOf":[{"type":"integer","minimum":30.0},{"type":"null"}],"title":"Retention Days"},"default_from_did_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default From Did Id","description":"A DID assigned to this account; null clears it."},"email_to_fax_allowlist":{"anyOf":[{"items":{"type":"string","format":"email"},"type":"array","maxItems":200},{"type":"null"}],"title":"Email To Fax Allowlist","description":"Replaces the allowlist. Empty disables email-to-fax for the account."},"notification_defaults":{"anyOf":[{"$ref":"#/components/schemas/NotificationDefaults"},{"type":"null"}]},"notification_mode":{"anyOf":[{"type":"string","enum":["attachment","link_only"]},{"type":"null"}],"title":"Notification Mode","description":"`attachment` or `link_only` for fax-received mail. Refused with 403 `compliance_locked` when the account's compliance policy fixes it."}},"type":"object","title":"SettingsPatch","description":"`default_from_did_id` needs numbers:write (or settings:write); every other field needs settings:write."},"SignInRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":1024,"minLength":1,"title":"Password"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id","description":"Tenant logins only: needed when the same email exists in several organizations."},"realm":{"anyOf":[{"type":"string","enum":["platform","tenant"]},{"type":"null"}],"title":"Realm","description":"Leave out to let the API decide (platform wins when the password matches both). `tenant` signs in to the customer login of an email that is also a platform admin (the switch the sign-in page offers)."}},"type":"object","required":["email","password"],"title":"SignInRequest"},"SignInResponse":{"properties":{"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"session_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Token"},"session_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Session Expires At"},"principal_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Principal Id"},"mfa_required":{"type":"boolean","title":"Mfa Required","description":"Second step needed: send `mfa_token` and a code from the authenticator (or a recovery code) to /v1/auth/mfa/verify.","default":false},"mfa_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfa Token","description":"Short-lived (MFA_CHALLENGE_TTL_MINUTES) challenge token."},"mfa_token_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mfa Token Expires At"},"mfa_enrollment_required":{"type":"boolean","title":"Mfa Enrollment Required","description":"Signed in, but the session can only enroll two-step verification (`/auth/mfa/enroll`, `/auth/mfa/enroll/confirm`) or sign out until it does.","default":false},"password_change_required":{"type":"boolean","title":"Password Change Required","description":"Platform admin signed in with a generated or reset password. The session can change it (`POST /admin/auth/password`) or sign out; the rest of /admin answers 403 `password_change_required` until it does.","default":false},"realm":{"type":"string","enum":["admin","user"],"title":"Realm","description":"`admin`: a platform session (use /admin/auth/token and /admin/auth/logout); `user`: a tenant session (/v1/auth/...)."},"tenant_login_available":{"type":"boolean","title":"Tenant Login Available","description":"Platform sign-ins only: the same email and password also open a customer login on this host. The sign-in page offers a switch (`realm: tenant`).","default":false}},"type":"object","required":["realm"],"title":"SignInResponse"},"SignupComplete":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":1024,"minLength":12,"title":"Password"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Your name (the owner login)."},"organization_name":{"type":"string","maxLength":200,"minLength":1,"title":"Organization Name"},"timezone":{"type":"string","maxLength":64,"title":"Timezone","description":"IANA timezone (the browser's); billing days and months follow it.","default":"America/New_York"},"accept_terms":{"type":"boolean","const":true,"title":"Accept Terms","description":"Must be true: the Terms of Service and Privacy Policy are accepted (their current versions are recorded)."},"website":{"type":"string","maxLength":200,"title":"Website","description":"Leave empty (anti-bot field).","default":""},"signup_token":{"type":"string","maxLength":4000,"minLength":10,"title":"Signup Token"},"setup_intent_id":{"type":"string","maxLength":255,"minLength":3,"title":"Setup Intent Id"}},"type":"object","required":["email","password","name","organization_name","accept_terms","signup_token","setup_intent_id"],"title":"SignupComplete"},"SignupCompleted":{"properties":{"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"status":{"type":"string","title":"Status","description":"`pending_verification` until the mailed link is opened."},"trial_credit_cents":{"type":"integer","title":"Trial Credit Cents"}},"type":"object","required":["organization_id","account_id","user_id","email","status","trial_credit_cents"],"title":"SignupCompleted"},"SignupStart":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":1024,"minLength":12,"title":"Password"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Your name (the owner login)."},"organization_name":{"type":"string","maxLength":200,"minLength":1,"title":"Organization Name"},"timezone":{"type":"string","maxLength":64,"title":"Timezone","description":"IANA timezone (the browser's); billing days and months follow it.","default":"America/New_York"},"accept_terms":{"type":"boolean","const":true,"title":"Accept Terms","description":"Must be true: the Terms of Service and Privacy Policy are accepted (their current versions are recorded)."},"website":{"type":"string","maxLength":200,"title":"Website","description":"Leave empty (anti-bot field).","default":""}},"type":"object","required":["email","password","name","organization_name","accept_terms"],"title":"SignupStart"},"SignupStarted":{"properties":{"signup_token":{"type":"string","title":"Signup Token","description":"Pass back to `POST /v1/signup/complete` with the same form fields."},"setup_intent_id":{"type":"string","title":"Setup Intent Id"},"client_secret":{"type":"string","title":"Client Secret","description":"For the card form (`confirmSetup`). The card is saved for later charges and is not charged at signup."},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["signup_token","setup_intent_id","client_secret","expires_at"],"title":"SignupStarted"},"SignupVerified":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"status":{"type":"string","title":"Status"}},"type":"object","required":["user_id","email","status"],"title":"SignupVerified"},"SignupVerify":{"properties":{"token":{"type":"string","maxLength":200,"minLength":10,"title":"Token"}},"type":"object","required":["token"],"title":"SignupVerify"},"StatementPeriod":{"properties":{"period":{"type":"string","title":"Period","description":"YYYY-MM in the organization timezone."},"early":{"type":"boolean","title":"Early","description":"True when a statement for this month was closed before the month ended."}},"type":"object","required":["period","early"],"title":"StatementPeriod"},"StatementPeriodList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/StatementPeriod"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"StatementPeriodList"},"StatementUrl":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"period":{"type":"string","title":"Period"},"url":{"type":"string","title":"Url","description":"Presigned GET for the PDF, valid for 5 minutes."},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"content_type":{"type":"string","title":"Content Type","default":"application/pdf"}},"type":"object","required":["account_id","period","url","expires_at"],"title":"StatementUrl"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"mfa_enrollment_required":{"type":"boolean","title":"Mfa Enrollment Required","description":"The session can only enroll two-step verification (`/auth/mfa/enroll`) or sign out until it does: its organization, account or the platform requires MFA.","default":false},"password_change_required":{"type":"boolean","title":"Password Change Required","description":"Platform admin whose password was generated or reset and must be replaced (`POST /admin/auth/password`) before the admin console will answer.","default":false}},"type":"object","required":["access_token","expires_at"],"title":"TokenResponse"},"TrialStatus":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"trial":{"type":"boolean","title":"Trial"},"converted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Converted At"},"has_number":{"type":"boolean","title":"Has Number","description":"At least one number is assigned to the account."},"has_payment_method":{"type":"boolean","title":"Has Payment Method"},"balance_cents":{"type":"integer","title":"Balance Cents"},"available_cents":{"type":"integer","title":"Available Cents","description":"Balance minus amounts held for faxes in flight."},"trial_credit_cents":{"type":"integer","title":"Trial Credit Cents","description":"Trial credit granted at signup (0 when none)."},"credit_exhausted":{"type":"boolean","title":"Credit Exhausted","description":"Trial only: the remaining credit does not cover one page."},"outbound_page_cents":{"type":"integer","title":"Outbound Page Cents","description":"Price per sent page for this account."},"caller_id_e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Id E164","description":"Trial only: the shared trial number faxes are sent from."},"sending_enabled":{"type":"boolean","title":"Sending Enabled"},"sending_disabled_reason":{"anyOf":[{"type":"string","enum":["trial_caller_id_unset","trial_credit_exhausted","trial_page_limit","no_from_number"]},{"type":"null"}],"title":"Sending Disabled Reason"},"daily_page_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Page Limit","description":"Trial only: pages per day."},"pages_today":{"type":"integer","title":"Pages Today"},"pages_remaining_today":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages Remaining Today"},"limits":{"items":{"type":"string"},"type":"array","title":"Limits","description":"Trial limits, in plain words (empty after conversion)."},"topup_default_cents":{"type":"integer","title":"Topup Default Cents"},"topup_min_cents":{"type":"integer","title":"Topup Min Cents"},"recharge_threshold_cents":{"type":"integer","title":"Recharge Threshold Cents"},"recharge_amount_cents":{"type":"integer","title":"Recharge Amount Cents"}},"type":"object","required":["account_id","trial","converted_at","has_number","has_payment_method","balance_cents","available_cents","trial_credit_cents","credit_exhausted","outbound_page_cents","caller_id_e164","sending_enabled","sending_disabled_reason","daily_page_limit","pages_today","pages_remaining_today","limits","topup_default_cents","topup_min_cents","recharge_threshold_cents","recharge_amount_cents"],"title":"TrialStatus","description":"What the Send, Numbers, Inbox and Billing screens need to explain the trial (or a missing number)."},"UploadOut":{"properties":{"content_ref":{"type":"string","format":"uuid","title":"Content Ref"},"content_type":{"type":"string","title":"Content Type"},"bytes":{"type":"integer","title":"Bytes"},"sha256":{"type":"string","title":"Sha256"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["content_ref","content_type","bytes","sha256","expires_at"],"title":"UploadOut"},"UsageLine":{"properties":{"kind":{"type":"string","title":"Kind"},"events":{"type":"integer","title":"Events"},"pages":{"type":"integer","title":"Pages"},"retail_cents":{"type":"integer","title":"Retail Cents"},"unpriced_events":{"type":"integer","title":"Unpriced Events","description":"Events of this line rated at $0 because no price was in force when they happened (before any rate was set).","default":0},"unpriced_pages":{"type":"integer","title":"Unpriced Pages","description":"Pages of those unpriced events.","default":0}},"type":"object","required":["kind","events","pages","retail_cents"],"title":"UsageLine"},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","maxLength":200,"title":"Name","default":""},"role":{"type":"string","enum":["account_admin","account_user","read_only"],"title":"Role","default":"account_user"}},"type":"object","required":["email"],"title":"UserCreate"},"UserCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"invite_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Token","description":"One-time token for POST /v1/auth/accept-invite. Mailed to the user; returned here only when APP_ENV is dev or test, and null on an idempotent replay."}},"type":"object","required":["id","organization_id","account_id","email","name","role","status","created_at","invite_token"],"title":"UserCreated"},"UserOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","organization_id","account_id","email","name","role","status","created_at"],"title":"UserOut"},"UserPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string","enum":["account_admin","account_user","read_only"]},{"type":"null"}],"title":"Role"},"status":{"anyOf":[{"type":"string","enum":["active","disabled"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"UserPatch"},"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"},"WebhookCreate":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","description":"Receiver URL. HTTPS required; HTTP only for loopback hosts in dev/test. Redirects are not followed."},"events":{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1,"title":"Events","description":"Event names this endpoint receives. '*' = every event of the endpoint's level except opt-in progress events (fax.transmitting), which must be named."}},"additionalProperties":false,"type":"object","required":["url"],"title":"WebhookCreate"},"WebhookCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"level":{"type":"string","title":"Level"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"previous_secret_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Previous Secret Expires At","description":"After a rotation, the old secret also verifies until this instant."},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Signing secret. Shown once; null on an idempotent replay."}},"type":"object","required":["id","level","organization_id","account_id","url","events","created_at","previous_secret_expires_at","secret"],"title":"WebhookCreated"},"WebhookOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"level":{"type":"string","title":"Level"},"organization_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Organization Id"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"previous_secret_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Previous Secret Expires At","description":"After a rotation, the old secret also verifies until this instant."}},"type":"object","required":["id","level","organization_id","account_id","url","events","created_at","previous_secret_expires_at"],"title":"WebhookOut"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":64,"minItems":1},{"type":"null"}],"title":"Events"}},"additionalProperties":false,"type":"object","title":"WebhookUpdate"}}},"servers":[{"url":"/v1"}]}