Update webhook destination
Update webhook destination: updateWebhookDestination in the TypeScript, Python, Rust and Go clients.
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>photon.projects.update_webhook_destination(input: UpdateWebhookDestinationInput, *, options: RequestOptions | None = None) -> models.WebhookDestinationclient.update_webhook_destination(idempotency_key: String, destination_id: String, project_id: String, body: &types::UpdateWebhookDestinationRequest).await -> Result<ResponseValue<types::WebhookDestination>, Error<UpdateWebhookDestinationError>>client.Projects.UpdateWebhookDestination(ctx context.Context, params *UpdateWebhookDestinationParams, opts ...RequestOption) (*WebhookDestination, error)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: {},
});import os
from photon_api import Photon
from photon_api.rpc_generated import UpdateWebhookDestinationInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.update_webhook_destination(
UpdateWebhookDestinationInput.model_validate({
"path": {
"destinationId": "destinationId",
"projectId": "projectId",
},
"headers": {
"Idempotency-Key": "idempotencyKey",
},
"body": {},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.update_webhook_destination(
"idempotencyKey".to_owned(),
"destinationId".to_owned(),
"projectId".to_owned(),
&serde_json::from_value(serde_json::json!({}))?,
)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"encoding/json"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.UpdateWebhookDestinationRequest
if err := json.Unmarshal([]byte(`{}`), &body); err != nil {
return err
}
result, err := client.Projects.UpdateWebhookDestination(ctx, &photonapi.UpdateWebhookDestinationParams{
IdempotencyKey: "idempotencyKey",
DestinationID: "destinationId",
ProjectID: "projectId",
Body: body,
})
if err != nil {
return err
}
_ = result{
"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
Selects the API contract date. Without it, the request is served as 2026-07-01.
Identifies one logical mutation across retries.
Body
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.