Rotate the signing secret
curl --request POST \
--url https://{host}/v1/webhook-endpoint/rotate-secret \
--header 'X-Api-Key: <api-key>'const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://{host}/v1/webhook-endpoint/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/webhook-endpoint/rotate-secret"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"url": "<string>",
"enabled": true,
"mode": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"secret": "<string>",
"previous_secret_until": "2023-11-07T05:31:56Z",
"failing_since": "2023-11-07T05:31:56Z"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}Webhook endpoint
Rotate the signing secret
A new signing secret, shown once. The old one keeps signing too for 24 hours, so nothing fails while it is swapped.
Required permission: feature:WEBHOOKS, webhooks:manage
POST
/
v1
/
webhook-endpoint
/
rotate-secret
Rotate the signing secret
curl --request POST \
--url https://{host}/v1/webhook-endpoint/rotate-secret \
--header 'X-Api-Key: <api-key>'const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://{host}/v1/webhook-endpoint/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/webhook-endpoint/rotate-secret"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": {
"url": "<string>",
"enabled": true,
"mode": "<string>",
"date_created": "2023-11-07T05:31:56Z",
"date_updated": "2023-11-07T05:31:56Z",
"secret": "<string>",
"previous_secret_until": "2023-11-07T05:31:56Z",
"failing_since": "2023-11-07T05:31:56Z"
},
"code": "13"
}{
"success": true,
"message": "<string>",
"request_id": "01a1775167aa7693a7acd8df7b596118",
"data": null,
"code": "13"
}