Rotate webhook secret
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.keystoneos.xyz/v1/platforms/me/webhooks/{endpoint_id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/platforms/me/webhooks/{endpoint_id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://api-staging.keystoneos.xyz/v1/platforms/me/webhooks/{endpoint_id}/rotate-secret \
--header 'Authorization: Bearer <token>'{
"new_secret": "<string>",
"previous_secret_valid_until": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Webhooks
Rotate webhook secret
Generate a new secret. The previous secret remains valid for 24 hours to allow for a graceful rollover.
POST
/
v1
/
platforms
/
me
/
webhooks
/
{endpoint_id}
/
rotate-secret
Rotate webhook secret
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.keystoneos.xyz/v1/platforms/me/webhooks/{endpoint_id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-staging.keystoneos.xyz/v1/platforms/me/webhooks/{endpoint_id}/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)curl --request POST \
--url https://api-staging.keystoneos.xyz/v1/platforms/me/webhooks/{endpoint_id}/rotate-secret \
--header 'Authorization: Bearer <token>'{
"new_secret": "<string>",
"previous_secret_valid_until": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Auth0 JWT access token. See Authentication for details.