Rotate webhook secret
curl --request POST \
--url https://api.aura-app.ai/v1/webhooks/{id}/rotate-secretimport requests
url = "https://api.aura-app.ai/v1/webhooks/{id}/rotate-secret"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.aura-app.ai/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.aura-app.ai/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",
]);
$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.aura-app.ai/v1/webhooks/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
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.aura-app.ai/v1/webhooks/{id}/rotate-secret")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aura-app.ai/v1/webhooks/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"grace_period_ends_at": "2026-03-22T08:00:00Z",
"new_secret": "def456...",
"old_secret": "abc123...",
"rotated_at": "2026-03-21T08:00:00Z",
"success": true
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"error": "Webhook subscription not found",
"success": false,
"code": "WEBHOOK_NOT_FOUND"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}Webhooks
Rotate webhook secret
Generate a new signing secret for a webhook subscription.
How it works:
- A new secret is generated and becomes active immediately
- The old secret remains valid for 24 hours (grace period)
- During the grace period, deliveries include BOTH signatures (comma-separated in
X-Aura-Signature) - After the grace period, only the new secret is used
Response includes:
old_secret- Previous secret (for verifying in-flight deliveries)new_secret- New secret (active immediately)grace_period_ends_at- When the old secret expires
Recommended flow:
- Call this endpoint
- Update your verification code to accept both secrets
- After the grace period, remove old secret from your code
POST
/
v1
/
webhooks
/
{id}
/
rotate-secret
Rotate webhook secret
curl --request POST \
--url https://api.aura-app.ai/v1/webhooks/{id}/rotate-secretimport requests
url = "https://api.aura-app.ai/v1/webhooks/{id}/rotate-secret"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.aura-app.ai/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.aura-app.ai/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",
]);
$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.aura-app.ai/v1/webhooks/{id}/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
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.aura-app.ai/v1/webhooks/{id}/rotate-secret")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aura-app.ai/v1/webhooks/{id}/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"grace_period_ends_at": "2026-03-22T08:00:00Z",
"new_secret": "def456...",
"old_secret": "abc123...",
"rotated_at": "2026-03-21T08:00:00Z",
"success": true
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"error": "Webhook subscription not found",
"success": false,
"code": "WEBHOOK_NOT_FOUND"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}{
"code": "<string>",
"error": "<string>",
"success": false,
"requestId": "<string>"
}Generate a new signing secret for a webhook subscription.
How it works:
- A new secret is generated and becomes active immediately
- The old secret remains valid for 24 hours (grace period)
- During the grace period, deliveries include BOTH signatures (comma-separated in
X-Aura-Signature) - After the grace period, only the new secret is used
old_secret- Previous secret (for verifying in-flight deliveries)new_secret- New secret (active immediately)grace_period_ends_at- When the old secret expires
- Call this endpoint
- Update your verification code to accept both secrets
- After the grace period, remove old secret from your code
Path Parameters
Webhook subscription ID (UUID)
Example:
"550e8400-e29b-41d4-a716-446655440000"
Response
Secret rotated successfully
When the old secret will stop being accepted (24h from rotation)
Example:
"2026-03-22T08:00:00Z"
New secret (used immediately for new deliveries)
Example:
"def456..."
Previous secret (valid for 24h to verify in-flight deliveries)
Example:
"abc123..."
When the rotation occurred (ISO 8601)
Example:
"2026-03-21T08:00:00Z"
Available options:
true