Skip to content

PATCH /v1/projects/{projectId}/webhooks/destinations/{destinationId}

Updates the supplied URL, name, description, status or enabledEvents fields on a project's webhook destination and returns its updated configuration. The payload API version is not a mutable field in this request. Event selections are checked against the destination's versioned catalog; signing-secret rotation is a separate operation. Supply the required Idempotency-Key header.

photon.projects.updateWebhookDestination(input: UpdateWebhookDestinationInput, options?: RequestOptions): Promise<UpdateWebhookDestinationOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.updateWebhookDestination({
  path: {
    destinationId: "destinationId",
    projectId: "projectId",
  },
  headers: {
    idempotencyKey: "idempotencyKey",
  },
  body: {},
});
{
  "apiVersion": "2026-01-01",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "deletedAt": null,
  "description": null,
  "destinationId": "string",
  "enabledEvents": [
    null
  ],
  "name": "string",
  "projectId": "string",
  "status": "enabled",
  "updatedAt": "2026-01-01T00:00:00.000Z",
  "url": "https://example.com"
}

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

Idempotency-Keystringrequired

Identifies one logical mutation across retries.

destinationIdstringrequired
projectIdstringrequired

Body

descriptionstring | null
enabledEventsWebhookEventSelection
namestring
statusWebhookDestinationStatus
urlstring (uri)

HTTPS URL without credentials or a fragment.

Returns

200 The updated webhook destination. WebhookDestination

Headers: Photon-Version. The raw response carries these headers; see Raw responses.

apiVersionstring (date)required
createdAtstring (date-time)required
deletedAtstring (date-time) | nullrequired
descriptionstring | nullrequired
destinationIdstringrequired
enabledEventsWebhookEventSelectionrequired
namestringrequired
projectIdstringrequired
statusWebhookDestinationStatusrequired
updatedAtstring (date-time)required
urlstring (uri)required