SDK reference · Python SDK
prov.account
prov.account in the Python SDK: 52 methods. The account methods.
Methods
usage
prov.account.usage() -> AnyCalls GET /v1/account/usage.
keys
prov.account.keys() -> AnyCalls GET /v1/account/keys.
rotate_key
prov.account.rotate_key(key_id: Optional[str] = …) -> AnyCalls POST /v1/account/keys/{id}/rotate_secret.
revoke_key
prov.account.revoke_key(key_id: str, reason: Optional[str] = …) -> AnyRevoke a key with no replacement (owners and admins).
Calls POST /v1/account/keys/{id}/revoke.
approval_settings
prov.account.approval_settings() -> AnyCalls GET /v1/mandate/settings/approvals.
set_approval_settings
prov.account.set_approval_settings(**fields: Any = …) -> AnySet default_expires_in (None resets it) and/or share_approver_ip.
Calls PUT /v1/mandate/settings/approvals.
capture_app
prov.account.capture_app() -> AnyCalls GET /v1/attest/settings/capture_app.
set_capture_app
prov.account.set_capture_app(**fields: Any = …) -> AnyCalls PUT /v1/attest/settings/capture_app.
reminder_settings
prov.account.reminder_settings() -> AnyThe limits every reminder runs under, your time zone for quiet hours, and the automatic schedule per product.
Calls GET /v1/account/reminders.
set_reminder_settings
prov.account.set_reminder_settings(**fields: Any = …) -> AnyAny of default_time_zone (IANA; None clears it), max_per_request (lower it), min_gap_seconds (raise it), quiet_hours (widen them) and schedules per product ({"capture_request": {"enabled": True, "after": ["24h", "72h"]}}; turning one on needs Pro or higher).
Calls PUT /v1/account/reminders.
approval_channels
prov.account.approval_channels() -> AnyThe account default (mode, channels) and, for owners and admins, people.
Calls GET /v1/account/approval_channels.
set_approval_channels
prov.account.set_approval_channels(channels: Any, mode: Optional[str] = …) -> AnySet the account default: channels (web_push, email, text, phone_call) and mode (first_available or all).
Calls PUT /v1/account/approval_channels.
text_consent_settings
prov.account.text_consent_settings() -> AnyHow consent to your texts is held, your statement for everyone, the counts and the wording in force.
Calls GET /v1/account/text_consent.
set_text_consent_settings
prov.account.set_text_consent_settings(**fields: Any = …) -> Anymode (provenance or company) and, under company, everyone ({"method":...} for everyone you text, None for each person you name; required the first time).
Calls PUT /v1/account/text_consent.
list_text_consents
prov.account.list_text_consents(**params: Any = …) -> AnyYour consent records, newest first (phone, status, source, limit, cursor).
Calls GET /v1/account/text_consents.
create_text_consent
prov.account.create_text_consent(**fields: Any = …) -> AnyRecord that a phone agreed to your texts: phone, method, obtained_at, optional evidence_url.
Calls POST /v1/account/text_consents.
get_text_consent
prov.account.get_text_consent(consent_id: str) -> AnyOne consent record.
Calls GET /v1/account/text_consents/{id}.
withdraw_text_consent
prov.account.withdraw_text_consent(consent_id: str) -> AnyRecord a withdrawal you received another way; the phone is stopped for your texts.
Calls POST /v1/account/text_consents/{id}/withdraw.
import_text_consents
prov.account.import_text_consents(csv: 'bytes | str', file_name: Optional[str] = …) -> AnySlice 2: import a CSV of phones that agreed to your texts (mode company, Pro and up): the columns phone, method, obtained_at and, optionally, evidence_url; up to 50,000 rows and 5 MB.
Calls POST /v1/account/text_consent_imports.
get_text_consent_import
prov.account.get_text_consent_import(import_id: str) -> AnySlice 2: one import, its status and counts and the first 1,000 rows not added.
Calls GET /v1/account/text_consent_imports/{id}.
text_consent_screenshots
prov.account.text_consent_screenshots() -> AnySlice 6: your screenshots of how people agree to your texts (records only), oldest first.
Calls GET /v1/account/text_consent/screenshots.
add_text_consent_screenshot
prov.account.add_text_consent_screenshot(image: bytes, content_type: str = …) -> AnySlice 6: under We have it, a screenshot (PNG or JPEG, up to 5 MB) of how people agree to your texts; up to five.
Calls POST /v1/account/text_consent/screenshots.
delete_text_consent_screenshot
prov.account.delete_text_consent_screenshot(screenshot_id: str) -> AnySlice 6: delete a screenshot; a review it was already sent to stops showing it.
Calls DELETE /v1/account/text_consent/screenshots/{id}.
capture_routing
prov.account.capture_routing() -> AnyWhere capture links open: the account default, each destination's availability, the order people get.
Calls GET /v1/attest/settings/capture_routing.
set_capture_routing
prov.account.set_capture_routing(**fields: Any = …) -> AnyOrder, store_listing (Growth and up) and require_tier (any plan).
Calls PUT /v1/attest/settings/capture_routing.
capture_retention
prov.account.capture_retention() -> AnyHow long captured images are kept (1–365 days, default 30).
Calls GET /v1/attest/settings/capture_retention.
set_capture_retention
prov.account.set_capture_retention(days: int) -> AnySet how long captured images are kept; applies to the images already held too.
Calls PUT /v1/attest/settings/capture_retention.
capture_list_label
prov.account.capture_list_label() -> AnyD-119: the workspace's word for the Captures list ("Captures" unless changed).
Calls GET /v1/attest/settings/capture_list.
set_capture_list_label
prov.account.set_capture_list_label(label: Optional[str]) -> AnyD-119: name the Captures list in the console (up to 24 characters); None puts back "Captures".
Calls PUT /v1/attest/settings/capture_list.
branding
prov.account.branding() -> AnyCalls GET /v1/account/branding.
set_branding
prov.account.set_branding(**fields: Any = …) -> AnySet any of name, primary, secondary, accent, help_url, email_from, email_from_name, email_reply_to (None clears one).
Calls PUT /v1/account/branding.
email_domains
prov.account.email_domains() -> AnyCalls GET /v1/account/email_domains.
add_email_domain
prov.account.add_email_domain(domain: str) -> AnyCalls POST /v1/account/email_domains.
verify_email_domain
prov.account.verify_email_domain(domain_id: str) -> AnyCalls POST /v1/account/email_domains/{id}/verify.
remove_email_domain
prov.account.remove_email_domain(domain_id: str) -> AnyCalls DELETE /v1/account/email_domains/{id}.
sending_numbers
prov.account.sending_numbers() -> AnyYour sending number and released history, with company_texts and notice.
Calls GET /v1/account/sending_numbers.
save_sending_number_details
prov.account.save_sending_number_details(**details: Any = …) -> AnySave your business details on any plan; on Pro and above the number is requested when the deployment can.
Calls POST /v1/account/sending_numbers.
sending_number
prov.account.sending_number(number_id: str) -> AnyCalls GET /v1/account/sending_numbers/{id}.
update_sending_number_details
prov.account.update_sending_number_details(number_id: str, **changes: Any = …) -> AnyEdit saved details (only before the request starts).
Calls PATCH /v1/account/sending_numbers/{id}.
resubmit_sending_number
prov.account.resubmit_sending_number(number_id: str, **corrections: Any = …) -> AnySend the corrected details of a number that needs a fix (three in any 24 hours).
Calls POST /v1/account/sending_numbers/{id}/resubmit.
add_sending_number_consent_evidence
prov.account.add_sending_number_consent_evidence(number_id: str, image: bytes, content_type: str = …) -> AnyAn image (PNG or JPEG, up to 5 MB) of how people agree, for a number that needs a fix.
Calls POST /v1/account/sending_numbers/{id}/consent_evidence.
delete_sending_number
prov.account.delete_sending_number(number_id: str) -> AnyDelete saved details, release a number (its details kept), or delete a released number's kept details.
Calls DELETE /v1/account/sending_numbers/{id}.
test_texts
prov.account.test_texts(request_id: Optional[str] = …, limit: Optional[int] = …, cursor: Optional[str] = …) -> AnyThe recorded test texts, newest first; request_id narrows the list to one request.
Calls GET /v1/account/test_texts.
test_text
prov.account.test_text(text_id: str) -> AnyOne recorded test text, with its body as it would have been sent.
Calls GET /v1/account/test_texts/{id}.
clear_test_text_stops
prov.account.clear_test_text_stops() -> AnyLift the stops the test number +12025550103 wrote (stands in for the person's START).
Calls DELETE /v1/account/test_texts/stops.
set_branding_logo
prov.account.set_branding_logo(data_base64: str) -> AnyCalls PUT /v1/account/branding/logo.
remove_branding_logo
prov.account.remove_branding_logo() -> AnyCalls DELETE /v1/account/branding/logo.
billing
prov.account.billing() -> AnyCalls GET /v1/account/billing.
upgrade_session
prov.account.upgrade_session() -> AnyCalls POST /v1/account/upgrade_session.
billing_portal
prov.account.billing_portal() -> AnyCalls POST /v1/account/billing_portal.
trace_explanations
prov.account.trace_explanations() -> AnyThe opt-in AI trip summary setting (default off) + whether an explainer is configured.
Calls GET /v1/trace/settings/explanations.
set_trace_explanations
prov.account.set_trace_explanations(ai_summary: Optional[str] = …, ai_labeling: Optional[str] = …) -> AnyOn" | "off" for the AI summary and/or AI labelling (an owner/admin session, or an admin-scope key).
Calls PUT /v1/trace/settings/explanations.