curl --request POST \
--url https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"signing_secret": "whsec_c2VjcmV0LWV4YW1wbGUtbm90LWEtcmVhbC1zZWNyZXQ="
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Rotate a webhook channel's signing secret
Generates a new Standard Webhooks signing secret for a webhook channel and returns it once, in this response. The previous secret stops verifying immediately, so deploy the new one to your receiver before the next alert fires. Use this if the secret from channel creation was lost or needs rotating; there is no endpoint that reads the current secret.
curl --request POST \
--url https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/notification/public/v1/channels/{channel_id}/regenerate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"signing_secret": "whsec_c2VjcmV0LWV4YW1wbGUtbm90LWEtcmVhbC1zZWNyZXQ="
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
A Barndoor API key, sent as Authorization: Bearer <key>. Keys are prefixed bdai_ and are opaque — do not attempt to decode one. Interchangeable with an OAuth 2.0 access token.
Path Parameters
Response
Successful Response
The one-time reveal of a webhook channel's signing secret.
The new signing secret, in Standard Webhooks form (whsec_ + base64). Shown exactly once, in this response — it is not readable afterwards. Use it to verify the signature on delivered payloads. Rotating invalidates the previous secret immediately, so deploy this value before the next alert fires.
"whsec_c2VjcmV0LWV4YW1wbGUtbm90LWEtcmVhbC1zZWNyZXQ="