Rotate webhook signing secret
curl --request POST \
--url https://api.shelv.dev/v1/webhooks/{id}/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shelv.dev/v1/webhooks/{id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"publicId": "<string>",
"secret": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Webhooks
Rotate webhook signing secret
Generate a new signing secret for a webhook. The old secret is invalidated immediately.
POST
/
v1
/
webhooks
/
{id}
/
rotate-secret
Rotate webhook signing secret
curl --request POST \
--url https://api.shelv.dev/v1/webhooks/{id}/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.shelv.dev/v1/webhooks/{id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shelv.dev/v1/webhooks/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"publicId": "<string>",
"secret": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}