PgBeam Docs
Webhooks

updateWebhookEndpoint

Update a webhook endpoint

Updates a webhook endpoint.

Usage

const result = await api.webhooks.updateWebhookEndpoint({
  pathParams: { project_id: "prj_xxx", webhook_id: "whk_xxx" },
  body: {
    url: "https://example.com/hooks/pgbeam",
  },
});

Parameters

ParameterTypeRequiredDescription
pathParams.project_idstringYesUnique project identifier (prefixed, e.g. prj_xxx).
pathParams.webhook_idstringYesUnique webhook endpoint identifier (prefixed, e.g. whk_xxx).
body.urlstringYesHTTPS endpoint that receives event deliveries.
body.secretstringNoShared secret used to sign delivery payloads. Write-only.
body.format"json" | "splunk_hec" | "datadog" | "elastic"NoPayload format for delivered events.
body.event_typesstring[]NoEvent types to deliver. Empty means all events.
body.enabledbooleanNoWhether deliveries are active for this endpoint.
body.descriptionstringNoHuman-readable label for the endpoint.

Response

Promise<WebhookEndpoint> — updated webhook endpoint.

Example

import { PgBeamClient } from "pgbeam";

const client = new PgBeamClient({
  token: "pbk_...",
  baseUrl: "https://api.pgbeam.com",
});

const result = await client.api.webhooks.updateWebhookEndpoint({
  pathParams: { project_id: "prj_xxx", webhook_id: "whk_xxx" },
  body: {
    url: "https://example.com/hooks/pgbeam",
  },
});

Errors

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

On this page