Webhook
Rotate Webhook Secret
Replace the signing secret. The new secret is in this answer only. Every delivery from now on is signed with it.
Scope: exports:manage.
POST
/
webhook
/
rotate-secret
Rotate Webhook Secret
curl --request POST \
--url https://api.clustr-ai.com/api/org/v1/webhook/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.clustr-ai.com/api/org/v1/webhook/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.clustr-ai.com/api/org/v1/webhook/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.clustr-ai.com/api/org/v1/webhook/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 => [
"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://api.clustr-ai.com/api/org/v1/webhook/rotate-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://api.clustr-ai.com/api/org/v1/webhook/rotate-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clustr-ai.com/api/org/v1/webhook/rotate-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{
"success": true,
"data": {
"url": "https://hooks.example.com/clustr",
"secret": "whsec_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
"secretRotatedAt": "2026-10-14T10:00:00Z",
"updatedAt": "2026-10-14T10:00:00Z"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or revoked API key"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "This key lacks the tenants:write scope"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body.",
"request_id": "<string>"
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests"
}
}{
"success": false,
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The organization service is unavailable"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body.",
"request_id": "<string>"
}
}⌘I
Rotate Webhook Secret
curl --request POST \
--url https://api.clustr-ai.com/api/org/v1/webhook/rotate-secret \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.clustr-ai.com/api/org/v1/webhook/rotate-secret"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.clustr-ai.com/api/org/v1/webhook/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.clustr-ai.com/api/org/v1/webhook/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 => [
"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://api.clustr-ai.com/api/org/v1/webhook/rotate-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://api.clustr-ai.com/api/org/v1/webhook/rotate-secret")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clustr-ai.com/api/org/v1/webhook/rotate-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{
"success": true,
"data": {
"url": "https://hooks.example.com/clustr",
"secret": "whsec_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
"secretRotatedAt": "2026-10-14T10:00:00Z",
"updatedAt": "2026-10-14T10:00:00Z"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or revoked API key"
}
}{
"success": false,
"error": {
"code": "FORBIDDEN",
"message": "This key lacks the tenants:write scope"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body.",
"request_id": "<string>"
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests"
}
}{
"success": false,
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The organization service is unavailable"
}
}{
"success": false,
"error": {
"code": "BAD_REQUEST",
"message": "Invalid request body.",
"request_id": "<string>"
}
}