SDK reference · Python SDK
prov.account.set_approval_channels
prov.account.set_approval_channels in Python SDK. Set the account default: channels (web_push, email, text, phone_call) and mode (first_available or all).
Signature
prov.account.set_approval_channels(channels: Any, mode: Optional[str] = …) -> AnyParameters
channelsAnyRequiredmodeOptional[str]
Request fields
modeenumfirst_available(tried in order until one delivers) orall(every channel). One offirst_available,all.channelsarray of enums- One or more channels, each once. On the person's own setting, each must be set up first.
only_betweenobject | null- Console people only: hours like { start: 08:00, end: 20:00, timezone: America/Chicago }, or null for any hour.
Show child attributes
startstring- Local start time (HH:MM).
endstring- Local end time (HH:MM).
timezonestring- The IANA time zone.
customer_orderarray of enums | null- Account default only: one to three channels, each once, in the order your customers get them; null goes back to the default.
customer_modeenum- Account default only: one at a time or all at once. One of
one_at_a_time,all_at_once.
Returns
Any The account default.
HTTP operation
PUT /v1/account/approval_channels: Set the account default
Errors
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/approval_channels`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "mode": "first_available", "channels": ["text", "email"] }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/account/approval_channels", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"mode": "first_available",
"channels": [
"text",
"email"
]
}).json()