SDK reference · Node SDK
prov.mandate.calls.declineProofRequest
prov.mandate.calls.declineProofRequest in Node SDK. Answer a proof request for a call your agent didn't place: the check returns no_proof.
Signature
prov.mandate.calls.declineProofRequest(id: string): Promise<CallProofRequest>Parameters
idstringRequired
Request fields
idstringpathRequired- The
proof_request_idfrom the event. reasonenumRequired- Always
not_ours. One ofnot_ours.
Returns
Promise<CallProofRequest> The declined proof request.
HTTP operation
POST /v1/mandate/calls/proof_requests/{id}/decline: Decline a proof request
Errors
- parameter_invalid
- parameter_missing
- authentication_required
- insufficient_scope
- resource_missing
- rate_limit_exceeded
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/calls/proof_requests/ccx_01M6XS88R5FRAGAMTCFZBXJVT2/decline`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "reason": "not_ours" }),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/mandate/calls/proof_requests/ccx_01M6XS88R5FRAGAMTCFZBXJVT2/decline", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"reason": "not_ours"
}).json()