View as Markdown

SDK reference · Node SDK

prov.account.setApprovalSettings

prov.account.setApprovalSettings in Node SDK. Set the default approval expiry in seconds (60 to 7 days), or null for the server default.

Signature

prov.account.setApprovalSettings(params: { defaultExpiresIn: number | null }): Promise<ApprovalSettings>

Parameters

params{ defaultExpiresIn: number | null }Required

Request fields

default_expires_ininteger | null
The default expiry in seconds; null resets it.
share_approver_ipboolean
Return the approver's IP address on decisions. Confirm you have a purpose first.
batch_max_amountnumber | null
Batch approval leaves any request above this amount for its own review; null resets it to 1,000.

Returns

Promise<ApprovalSettings> The approval settings in effect.

HTTP operation

PUT /v1/mandate/settings/approvals: Set the approval settings

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/settings/approvals`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "default_expires_in": 1800 }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.