Skip to content

POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/secret-rotations

Rotates the signing secret for the selected project's webhook destination and returns the new secret. The optional overlapSeconds controls the requested overlap with the previous secret according to the documented request constraints. Store the new secret securely and update the receiver's signature verification configuration; it is returned only in this response and in idempotent replays of it, never by destination reads. Supply the required Idempotency-Key header.

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

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.rotateWebhookSigningSecret({
  path: {
    destinationId: "destinationId",
    projectId: "projectId",
  },
  headers: {
    idempotencyKey: "idempotencyKey",
  },
  body: {},
});
{
  "previousSecretExpiresAt": null,
  "signingSecret": "string"
}

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

overlapSecondsinteger

Returns

200 The new signing secret. RotateWebhookSigningSecretResponse

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

previousSecretExpiresAtstring (date-time) | nullrequired
signingSecretstringrequired