PgBeam Docs
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

ParameterTypeRequiredDescription
pathParams.project_idstringYesUnique project identifier (prefixed, e.g. prj_xxx).
pathParams.agent_idstringYesUnique agent credential identifier (prefixed, e.g. agt_xxx).
body.status"active" | "disabled"YesSet 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

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.

On this page