SDK reference · Node SDK
prov.account.setNotifyOn
prov.account.setNotifyOn in Node SDK. Which events reach your humans (deny/velocity/revocation…).
Signature
prov.account.setNotifyOn(events: string[]): Promise<{ notifyOn: string[] }>Parameters
eventsstring[]Required
Request fields
notify_onarray of enumsRequired- Events that notify by SMS or WhatsApp.
Returns
Promise<{ notifyOn: string[] }> The updated event preferences.
HTTP operation
PUT /v1/account/notify_on: Choose notification events
Errors
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/notify_on`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "notify_on": ["approval_requested", "deny"] }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/account/notify_on", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"notify_on": [
"approval_requested",
"deny"
]
}).json()