Agents
updateAgentCredentialStatus
Enable or disable an agent credential
Toggles the kill-switch. Disabling drops live connections within seconds.
Usage
const result = await api.agents.updateAgentCredentialStatus({
pathParams: { project_id: "prj_xxx", agent_id: "agt_xxx" },
body: {
status: "active",
},
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pathParams.project_id | string | Yes | Unique project identifier (prefixed, e.g. prj_xxx). |
| pathParams.agent_id | string | Yes | Unique agent credential identifier (prefixed, e.g. agt_xxx). |
| body.status | "active" | "disabled" | Yes | Set active to re-enable or disabled to kill-switch. Use DELETE to revoke permanently. |
Response
Promise<AgentCredential> — updated agent credential.
Example
import { PgBeamClient } from "pgbeam";
const client = new PgBeamClient({
token: "pbk_...",
baseUrl: "https://api.pgbeam.com",
});
const result = await client.api.agents.updateAgentCredentialStatus({
pathParams: { project_id: "prj_xxx", agent_id: "agt_xxx" },
body: {
status: "active",
},
});Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 404 | Resource not found. |