curl --request POST \
--url https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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://api.zebratruth.ai/v1/compliance/webhooks/video/secret/rotate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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{
"secret": "<string>",
"rotatedAt": "2023-11-07T05:31:56Z",
"previousSecretExisted": true
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}Rotate the tenant's video webhook signing secret
Generates a brand-new tenant-level webhook signing secret, replacing any existing value. Returns the new secret in the response (the only time it is exposed).
Important — in-flight deliveries are unaffected. Each delivery’s HMAC signature is computed at enqueue time and stored on the delivery record, so retries for already-queued webhooks continue to verify against the OLD secret. New jobs sign with the new secret.
Update your verifier immediately. After rotation, your receiver must accept the NEW secret on the next job’s webhook. Most receivers accept both old + new during a brief grace window — recommended.
curl --request POST \
--url https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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://api.zebratruth.ai/v1/compliance/webhooks/video/secret/rotate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zebratruth.ai/v1/compliance/webhooks/video/secret/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{
"secret": "<string>",
"rotatedAt": "2023-11-07T05:31:56Z",
"previousSecretExisted": true
}{
"statusCode": 401,
"message": "Invalid API key",
"error": true,
"url": "https://api.zebratruth.ai/v1/whoami",
"statusMessage": "Invalid API key"
}Authorizations
API key starting with zt_live_ (production) or zt_test_ (sandbox).
Get your key at https://developers.zebratruth.ai
Response
Secret rotated
The NEW signing secret. The old one is invalidated for any future jobs (in-flight deliveries keep using their pre-stored signature).
^whsec_[0-9a-f]{48}$False on first-ever rotation (functionally identical to auto-create on first GET).