Rotate the signing secret
curl --request POST \
--url https://api.spendin.app/v1/webhooks/config/rotate-secret \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.spendin.app/v1/webhooks/config/rotate-secret"
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'X-API-Key': '<api-key>'}
};
fetch('https://api.spendin.app/v1/webhooks/config/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.spendin.app/v1/webhooks/config/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 => [
"Idempotency-Key: <idempotency-key>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.spendin.app/v1/webhooks/config/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-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.spendin.app/v1/webhooks/config/rotate-secret")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spendin.app/v1/webhooks/config/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"webhook_url": {},
"signing_secret": "whsec_a1b2c3...",
"warning": "Store this secret securely. It will not be shown again."
}webhooks
Rotate the signing secret
Returns the new secret once. It takes effect immediately — there is no grace window during which the previous secret still verifies.
POST
/
v1
/
webhooks
/
config
/
rotate-secret
Rotate the signing secret
curl --request POST \
--url https://api.spendin.app/v1/webhooks/config/rotate-secret \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.spendin.app/v1/webhooks/config/rotate-secret"
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', 'X-API-Key': '<api-key>'}
};
fetch('https://api.spendin.app/v1/webhooks/config/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.spendin.app/v1/webhooks/config/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 => [
"Idempotency-Key: <idempotency-key>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.spendin.app/v1/webhooks/config/rotate-secret"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-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.spendin.app/v1/webhooks/config/rotate-secret")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spendin.app/v1/webhooks/config/rotate-secret")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"webhook_url": {},
"signing_secret": "whsec_a1b2c3...",
"warning": "Store this secret securely. It will not be shown again."
}Authorizations
Headers
Unique idempotency token per logical write (UUID v4). Re-send the same value on safe retries.
Example:
"a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
⌘I