Rotate the signing secret
curl --request POST \
--url https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate', 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://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate",
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://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate"
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://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate")
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{
"signingSecret": "whsec_Gq3n4yK8sZ2mV7xR1tL9wC5pB6hD0fJ4aE8uN2kM3oY="
}{
"error": "unauthorized",
"message": "Invalid API key",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "not_found",
"message": "Webhook endpoint not found",
"requestId": "req_q7vei435zifs51ia0lqr"
}Webhooks
Rotate the signing secret
Replaces the secret immediately — deliveries already in flight were signed with the old one, so update your verifier before rotating.
POST
/
v1
/
webhooks
/
signing-secret
/
{endpointId}
/
rotate
Rotate the signing secret
curl --request POST \
--url https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate', 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://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate",
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://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate"
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://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.platform.chipper.ai/v1/webhooks/signing-secret/{endpointId}/rotate")
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{
"signingSecret": "whsec_Gq3n4yK8sZ2mV7xR1tL9wC5pB6hD0fJ4aE8uN2kM3oY="
}{
"error": "unauthorized",
"message": "Invalid API key",
"requestId": "req_q7vei435zifs51ia0lqr"
}{
"error": "not_found",
"message": "Webhook endpoint not found",
"requestId": "req_q7vei435zifs51ia0lqr"
}Authorizations
Your API key: sk_test_… (sandbox) or sk_live_… (production).
Path Parameters
Webhook endpoint id.
Example:
"whe_k3m9x2pq7vn4t8wz1bcd"
Response
The new secret.
Standard Webhooks secret. Base64-decode the part after whsec_ for the HMAC key (libraries do this for you).
Example:
"whsec_Gq3n4yK8sZ2mV7xR1tL9wC5pB6hD0fJ4aE8uN2kM3oY="
⌘I