cURL
curl -X POST "https://api.alex.com/v2/webhook-endpoints/4f8a2c6e-1b3d-4a5c-9e7f-0a2b4c6d8e1f/rotate-secret" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"import requests
url = "https://api.alex.com/v2/webhook-endpoints/{id}/rotate-secret"
payload = {}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.alex.com/v2/webhook-endpoints/{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.alex.com/v2/webhook-endpoints/{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_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alex.com/v2/webhook-endpoints/{id}/rotate-secret"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.alex.com/v2/webhook-endpoints/{id}/rotate-secret")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/webhook-endpoints/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"object": "webhook_endpoint",
"id": "4f8a2c6e-1b3d-4a5c-9e7f-0a2b4c6d8e1f",
"url": "https://hooks.example.com/alex",
"event_types": [
"application.stage_changed",
"interview.evaluated"
],
"enabled": true,
"disabled_reason": null,
"created_at": "2026-11-28T09:30:00.000Z",
"updated_at": "2026-11-30T14:05:12.000Z",
"secret": "whsec_3f9a1c7e5b2d4f6a8c0e2a4c6e8a0c2e4a6c8e0a2c4e6a8c0e2a4c6e8a0c2e4a"
}Webhook Endpoints
Rotate a webhook endpoint's secret
Replaces the endpoint’s signing secret. The old secret stops signing at once, and deliveries already queued are signed with the new one. The response carries the new secret; an idempotent replay has secret: null.
POST
/
webhook-endpoints
/
{id}
/
rotate-secret
cURL
curl -X POST "https://api.alex.com/v2/webhook-endpoints/4f8a2c6e-1b3d-4a5c-9e7f-0a2b4c6d8e1f/rotate-secret" \
-H "X-API-Key: $ALEX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"import requests
url = "https://api.alex.com/v2/webhook-endpoints/{id}/rotate-secret"
payload = {}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.alex.com/v2/webhook-endpoints/{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.alex.com/v2/webhook-endpoints/{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_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alex.com/v2/webhook-endpoints/{id}/rotate-secret"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.alex.com/v2/webhook-endpoints/{id}/rotate-secret")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alex.com/v2/webhook-endpoints/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"object": "webhook_endpoint",
"id": "4f8a2c6e-1b3d-4a5c-9e7f-0a2b4c6d8e1f",
"url": "https://hooks.example.com/alex",
"event_types": [
"application.stage_changed",
"interview.evaluated"
],
"enabled": true,
"disabled_reason": null,
"created_at": "2026-11-28T09:30:00.000Z",
"updated_at": "2026-11-30T14:05:12.000Z",
"secret": "whsec_3f9a1c7e5b2d4f6a8c0e2a4c6e8a0c2e4a6c8e0a2c4e6a8c0e2a4c6e8a0c2e4a"
}Authorizations
apiKeyAuthbearerAuth
Headers
A unique value, 1 to 255 characters, that makes the request safe to retry. See Idempotency.
Required string length:
1 - 255Body
application/json
No fields. Send no body, or {}.
Response
The endpoint, with its new secret.
The event types to deliver, or "*" for every type. Duplicates are removed.
Minimum array length:
1What happened. See Events and webhooks.
Available options:
application.created, application.stage_changed, application.round_advanced, application.withdrawn, interview.started, interview.completed, interview.evaluated, handoff.scheduled, handoff.completed, handoff.missed, handoff.cancelled, handoff.reopened, job.created, job.updated, job.deleted, data_export.completed