Skip to main content
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>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required
Pattern: ^wh_[0-9a-f]{24}$

Response

New signing secret

publicId
string
required
Pattern: ^wh_[0-9a-f]{24}$
secret
string
required