Rotate a Subscription Secret
curl --request POST \
--url https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret \
--header 'Accept: <accept>' \
--header 'AccessToken: <api-key>'import requests
url = "https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret"
headers = {
"Accept": "<accept>",
"AccessToken": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Accept: '<accept>', AccessToken: '<api-key>'}};
fetch('https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-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://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-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 => [
"Accept: <accept>",
"AccessToken: <api-key>"
],
]);
$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://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Accept", "<accept>")
req.Header.Add("AccessToken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret")
.header("Accept", "<accept>")
.header("AccessToken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["AccessToken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 42,
"company_id": 6042,
"endpoint_url": "https://hooks.yourapp.com/coverwhale",
"event_types": [
"submission.bind_completed"
],
"active": true,
"secret": "whsec_3a8f5d2c9e1b...",
"secret_rotated_at": "2026-07-14T13:00:00+00:00",
"created_at": "2026-07-14T12:00:00+00:00",
"updated_at": "2026-07-14T13:00:00+00:00"
}{
"error": "Not found"
}Webhook Subscriptions
Rotate a Subscription Secret
Generate a new signing secret for a subscription. The new secret is returned only in this response — store it now. The previous secret keeps verifying for a short grace window so in-flight deliveries signed with it still validate.
POST
/
webhook-subscriptions
/
{id}
/
rotate-secret
Rotate a Subscription Secret
curl --request POST \
--url https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret \
--header 'Accept: <accept>' \
--header 'AccessToken: <api-key>'import requests
url = "https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret"
headers = {
"Accept": "<accept>",
"AccessToken": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Accept: '<accept>', AccessToken: '<api-key>'}};
fetch('https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-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://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-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 => [
"Accept: <accept>",
"AccessToken: <api-key>"
],
]);
$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://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Accept", "<accept>")
req.Header.Add("AccessToken", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret")
.header("Accept", "<accept>")
.header("AccessToken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coverwhale.dev/v1/webhook-subscriptions/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = '<accept>'
request["AccessToken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 42,
"company_id": 6042,
"endpoint_url": "https://hooks.yourapp.com/coverwhale",
"event_types": [
"submission.bind_completed"
],
"active": true,
"secret": "whsec_3a8f5d2c9e1b...",
"secret_rotated_at": "2026-07-14T13:00:00+00:00",
"created_at": "2026-07-14T12:00:00+00:00",
"updated_at": "2026-07-14T13:00:00+00:00"
}{
"error": "Not found"
}Authorizations
JWT returned as AccessToken by the /authentication endpoint (the Cognito ID token carrying the email claim). It expires after 3600 seconds.
Path Parameters
Response
Secret rotated — new secret included here only
Example:
42
Example:
6042
Example:
"https://hooks.yourapp.com/coverwhale"
Example:
["submission.bind_completed"]
Example:
true
The new signing secret — shown only here.
Example:
"whsec_3a8f5d2c9e1b..."
Example:
"2026-07-14T13:00:00+00:00"
Example:
"2026-07-14T12:00:00+00:00"
Example:
"2026-07-14T13:00:00+00:00"