SDK reference · Node SDK
prov.mandate.agents.unsuspend
prov.mandate.agents.unsuspend in Node SDK.
Signature
prov.mandate.agents.unsuspend(id: string): Promise<Agent>Parameters
idstringRequired
Request fields
Idempotency-Keystringheader- Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired- The object's ID.
Returns
Promise<Agent> The agent, active again.
HTTP operation
POST /v1/mandate/agents/{id}/unsuspend: Unsuspend an agent
Errors
Example
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "invoice-bot" }),
})).json();
const agentId = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/suspend`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/agents/${agentId}/unsuspend`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/agents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
"name": "invoice-bot"
}).json()
agent_id = step1["id"]
step2 = httpx.post(f"{api}/v1/mandate/agents/{agent_id}/suspend", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
data = httpx.post(f"{api}/v1/mandate/agents/{agent_id}/unsuspend", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()