Skip to content

Rotate a webhook signing secret

POST
/organizations/{org_id}/webhooks/{target_id}/rotate-secret
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. Accepts API keys with the webhooks:write scope, subject to current role and resource grants.

org_id
required
string
target_id
required
string

Request succeeded. The response body contains the result.

Media typeapplication/json
object
secret
required

Neues volles Signatur-Secret, NUR in dieser Antwort.

string
Examplegenerated
{
"secret": "example"
}

The request is invalid. Check the supplied fields and values.

Authentication is missing or invalid.

The authenticated caller does not have permission to perform this operation.

No accessible resource matches the supplied identifier.