Rotate a webhook signing secret
Issues a new signing secret. The previous secret keeps signing deliveries for 24 hours so receivers can roll over without downtime.
POST
/webhooks/{id}/rotate-secretPath parameters
idstringrequiredResponses
200OK
idstringrequiredurlstringrequiredeventsstring[]requiredenabledbooleanrequiredcreatedAtstring<date-time>requiredsecretstringrequired401401
One of:
object
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "Authentication required. Pass an organization API key in the `x-api-key` header."
dataanyobject
definedanyrequiredcodestringrequiredstatusnumberrequiredmessagestringrequireddataany404404
One of:
object
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "No webhook endpoint with that id in this organization."
dataanyobject
definedanyrequiredcodestringrequiredstatusnumberrequiredmessagestringrequireddataany429429
One of:
object
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "The organization's API request limit for this period has been reached."
dataanyobject
definedanyrequiredcodeanyrequiredstatusanyrequiredmessagestringrequireddefault: "Too many requests. Try again shortly."
dataanyobject
definedanyrequiredcodestringrequiredstatusnumberrequiredmessagestringrequireddataanyRequest
curl -X POST "https://stetcms.com/api/v1/webhooks/string/rotate-secret"const response = await fetch("https://stetcms.com/api/v1/webhooks/string/rotate-secret", {
method: "POST"
});Response
{
"id": "string",
"url": "string",
"events": [
"content.changed"
],
"enabled": true,
"createdAt": "2024-01-01T00:00:00Z",
"secret": "string"
}{
"defined": true,
"code": "UNAUTHORIZED",
"status": 401,
"message": "Authentication required. Pass an organization API key in the `x-api-key` header.",
"data": "string"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "No webhook endpoint with that id in this organization.",
"data": "string"
}{
"defined": true,
"code": "QUOTA_EXCEEDED",
"status": 429,
"message": "The organization's API request limit for this period has been reached.",
"data": "string"
}