Rotate the signing secret
POST/v1/webhook_endpoints/{id}/rotate_secret
Creates a new signing secret and returns it once. Until the current secret expires, every request is signed with both secrets, so webhook-signature carries two v1 entries. See Rotate the signing secret in the guide.
Permissions: Secret key with webhooks:manage.
Guide
WebhooksRequest headers#
Idempotency-KeystringAny string up to 255 characters; use a UUID v4. Kept 24 hours per key (or member) and endpoint. Same key and body replays the first response withIdempotent-Replayed: true.Max Length 255
Path parameters#
idstring (uuid)Required
Request body#
expire_current_in_hoursintegerHow long the current secret keeps signing. Default 24. Use0if the secret leaked.Min 0Default 24
Response fields#
Returns 200 with WebhookEndpoint
idstring (uuid)The endpoint's id.urlstring (uri)Where events are sent. HTTPS on a public hostname.descriptionstringNullableYour label, up to 255 characters.Max Length 255event_typesarray of stringTypes this endpoint gets, or["*"]for all types, including types added later. See Webhook event types.statusstringenabledordisabled. unPLUG setsdisabledafter 3 days of failed deliveries.One ofenabled,disabledsecretstringThe signing secret,whsec_followed by base64. Returned only when you create the endpoint or rotate the secret.created_atstring (date-time)When the endpoint was created.updated_atstring (date-time)When the endpoint last changed.
Error descriptions#
400Bad request
invalid_param
expire_current_in_hours is negative or not a whole number.
404Not found
not_found
No endpoint with this id in this environment.
Any endpoint can also return the common errors.