curl --request POST \
--url https://api.anchorbrowser.io/v1/webhooks/{id}/rotate-secret \
--header 'anchor-api-key: <api-key>'import requests
url = "https://api.anchorbrowser.io/v1/webhooks/{id}/rotate-secret"
headers = {"anchor-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'anchor-api-key': '<api-key>'}};
fetch('https://api.anchorbrowser.io/v1/webhooks/{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.anchorbrowser.io/v1/webhooks/{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 => [
"anchor-api-key: <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.anchorbrowser.io/v1/webhooks/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("anchor-api-key", "<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.anchorbrowser.io/v1/webhooks/{id}/rotate-secret")
.header("anchor-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anchorbrowser.io/v1/webhooks/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["anchor-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "wh_01HXJ4MZ7K9P3Q6R8S2T4V5W7Y",
"project_id": "5d2c31f6-ab7e-481a-b6fd-8b4a96a4e197",
"url": "https://your-app.example.com/anchor/webhooks",
"description": "Production task notifications",
"subscribed_events": [
"task.completed"
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "36da51b166a69268a59a8d5ee0b32c9f5e5aaee7d301c7a5a36844318e116fc6"
}Rotate Webhook Signing Secret
Mint a new HMAC-SHA256 signing secret. The previous secret remains valid for 24 hours so you can update your verification code at your own pace, then drop the old secret.
The new secret is returned exactly once, in the secret field.
curl --request POST \
--url https://api.anchorbrowser.io/v1/webhooks/{id}/rotate-secret \
--header 'anchor-api-key: <api-key>'import requests
url = "https://api.anchorbrowser.io/v1/webhooks/{id}/rotate-secret"
headers = {"anchor-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'anchor-api-key': '<api-key>'}};
fetch('https://api.anchorbrowser.io/v1/webhooks/{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.anchorbrowser.io/v1/webhooks/{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 => [
"anchor-api-key: <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.anchorbrowser.io/v1/webhooks/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("anchor-api-key", "<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.anchorbrowser.io/v1/webhooks/{id}/rotate-secret")
.header("anchor-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anchorbrowser.io/v1/webhooks/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["anchor-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "wh_01HXJ4MZ7K9P3Q6R8S2T4V5W7Y",
"project_id": "5d2c31f6-ab7e-481a-b6fd-8b4a96a4e197",
"url": "https://your-app.example.com/anchor/webhooks",
"description": "Production task notifications",
"subscribed_events": [
"task.completed"
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"secret": "36da51b166a69268a59a8d5ee0b32c9f5e5aaee7d301c7a5a36844318e116fc6"
}Authorizations
API key for your Anchor Browser account, sent as the anchor-api-key header on every
request. Create one at app.anchorbrowser.io (API Access).
Response
New signing secret issued.
Same shape as WebhookPublic plus the freshly minted signing secret.
Returned ONLY by create and rotate-secret. Store it the first time —
Anchor never returns it again. If lost, rotate to mint a new one.
Event types this webhook is currently subscribed to.
Catalog of webhook event types Anchor can deliver. Adding a new event type is a coordinated change between session-manager (publisher), webhook-dispatcher (consumer), and the dashboard.
task.completed, task.failed, task.cancelled, task.healed, session.ready, session.completed, session.failed, session.recording.ready, batch.completed, batch.failed, intervention.requested, intervention.resolved, identity.authenticated, identity.authentication_failed Was this page helpful?

