View as Markdown

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] = …) -> Any

Parameters

channelsAnyRequired
modeOptional[str]

Request fields

modeenum
first_available (tried in order until one delivers) or all (every channel). One of first_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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.