Rotate a webhook signing secret
POST
/organizations/{org_id}/webhooks/{target_id}/rotate-secret
const url = 'https://api.perstat.io/organizations/example/webhooks/example/rotate-secret';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.perstat.io/organizations/example/webhooks/example/rotate-secret \ --header 'Authorization: Bearer <token>'Generates a new signing secret for the webhook target and returns it exactly once; signatures made with the previous secret are invalid immediately, there is no dual-secret grace window. Only valid for targets of kind webhook, Slack targets return 400. Requires project management rights.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org_id
required
string
target_id
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
secret
required
Neues volles Signatur-Secret, NUR in dieser Antwort.
string
Examplegenerated
{ "secret": "example"}