latestOpenAPI 3.1.02026-08-221163801019.2 KB

f0f28319e448

Webhook Destination

Rotate the secret of a webhook destination

Replace the secret for the given webhook destination. The new secret will be returned and cannot be retrieved later.

Until the dual_signing_stops_at timestamp in the response, which is roughly 30 minutes after the generation of the new secret, the webhook will be signed by both the old and the new secret. This allows the webhook consumer to transition to the new secret without downtime.

The webhook rotation can occur at most once per hour for each webhook destination.

Permissions

This endpoint requires the following permissions:

  • Webhook:UpdateWebhookDestination for the webhook destination.
post/v1/{organization}/webhook_destination/{webhook_destination_id}/rotate-secret

Path parameters

webhook_destination_idstring required

The ID for the webhook destination to rotate the secret for.

The ID for the webhook destination to rotate the secret for.

organizationstring required

Headers

x-mongo-cluster-namestring nullable

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

Sec-WebSocket-Protocolstring[]

Response

Succeeded.

secretstring required

The new secret used to sign the webhook event. This is only visible once and cannot be retrieved later. For the next 30 minutes, the webhook will be signed by both the old and the new secret.

dual_signing_stops_atstring date-time required

A UTC time where the dual-signing behavior stops. After this time, webhooks will only be signed using the new secret from this endpoint.