SDK reference · Node SDK

prov.authorize.calls.request

prov.authorize.calls.request in Node SDK. Ask for more during the call: within_scope, or a confirmation to the person behind the agent while the call holds.

Signature

prov.authorize.calls.request(id: string, params: CallRequestParams): Promise<CallCheck>

Parameters

idstringRequired
paramsCallRequestParamsRequired

Request fields

idstringpathRequired
The check's ID (ccx_).
action_typestringRequired
What the caller asks for, as a call purpose such as book.
amountinteger | null
The amount in minor units.
currencystring | null
The three-letter currency code.
descriptionstringRequired
The request in a sentence, shown to the person.
waitinteger
Seconds the confirmation stays open. Default 120.

Returns

Promise<CallCheck> The check, with the request and its status.

HTTP operation

POST /v1/authorize/call_checks/{id}/requests: Ask for more during a call

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks/ccx_01M6XS88P2M5MCC1VC53DYC1TJ/requests`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_type": "book",
    "amount": 45000,
    "currency": "USD",
    "description": "Private room for 12, with a deposit",
    "wait": 120
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.